Robert Ennals [EMAIL PROTECTED] wrote:
Surely that problem only arises if one insists on encoding all the relevant
information inside a string.
This is pretty much the only option, because translators
and programmers are different people. Translators can deal with
simple text files
tor 2002-05-16 klockan 10.50 skrev Robert Ennals:
I don't really see what makes a string such as
I have %. %. %.. [where the user has to work out what the substrings are]
any harder to deal with than
I have ++ action ++ ++ number ++ ++ whatas
other from the fact that the
tis 2002-05-14 klockan 18.56 skrev anatoli:
Robert Ennals [EMAIL PROTECTED] wrote:
Surely that problem only arises if one insists on encoding all the relevant
information inside a string.
This is pretty much the only option, because translators
and programmers are different people.
tis 2002-05-14 klockan 06.37 skrev anatoli:
Brian Huffman [EMAIL PROTECTED] wrote:
Here is a printf-style function that I hacked up this morning; it uses type
classes but it doesn't need functional dependencies:
[snip]
It's very nice and even extendable, though `class Printf String'
is
On Tuesday, May 14, 2002, at 06:37 AM, anatoli wrote:
Brian Huffman [EMAIL PROTECTED] wrote:
Here is a printf-style function that I hacked up this morning; it uses
type
classes but it doesn't need functional dependencies:
[snip]
It's very nice and even extendable, though `class Printf
Martin Norbäck [EMAIL PROTECTED] wrote:
I agree that i18n needs positional arguments.
What's wrong with simply doing like this:
printf I have %. %. %..[trained, show 1, Jedi]
printf %2. %3. %1. I have. [trained, show 1, Jedi]
Nothing is exceptionally wrong with it, except it's not
as
Martin Norbäck [EMAIL PROTECTED] wrote:
I agree that i18n needs positional arguments.
What's wrong with simply doing like this:
printf I have %. %. %..[trained, show 1, Jedi]
printf %2. %3. %1. I have. [trained, show 1, Jedi]
Nothing is exceptionally wrong with it, except it's
tis 2002-05-14 klockan 16.45 skrev Robert Ennals:
Martin Norbäck [EMAIL PROTECTED] wrote:
I agree that i18n needs positional arguments.
What's wrong with simply doing like this:
printf I have %. %. %..[trained, show 1, Jedi]
printf %2. %3. %1. I have. [trained, show 1, Jedi]
On Tue, May 14, 2002 at 03:45:36PM +0100, Robert Ennals wrote:
Just thought I would jump in and say that, unlike (it seems)
everyone else, I hate printf in C. It is a horrible horrible
inextensible hack of a function that I find extremely awkward to
use.
...
I personally much prefer the
Robert Ennals [EMAIL PROTECTED] wrote:
I personally much prefer the syntax currently used in Haskell, which is also
essentially what is used in most other recent languages, including Java, C++,
and (god help me) Perl.
In the example given, I could write:
I have ++ action ++ ++
Robert Ennals [EMAIL PROTECTED] wrote:
I personally much prefer the syntax currently used in Haskell, which is also
essentially what is used in most other recent languages, including Java, C++,
and (god help me) Perl.
In the example given, I could write:
I have ++ action ++
Robert Ennals [EMAIL PROTECTED] wrote:
Surely that problem only arises if one insists on encoding all the relevant
information inside a string.
This is pretty much the only option, because translators
and programmers are different people. Translators can deal with
simple text files with one
On Sunday 12 May 2002 03:50 am, Sebastien Carlier wrote:
the python string notation (str % tuple) would fit really well too...
putStrLn hello %s, you got %d right % (oliver, 5)
Might be nice.
What would be the type of putStrLn then?
The type of putStrLn would remain unchanged.
Brian Huffman [EMAIL PROTECTED] wrote:
Here is a printf-style function that I hacked up this morning; it uses type
classes but it doesn't need functional dependencies:
[snip]
It's very nice and even extendable, though `class Printf String'
is unfortunately not Haskell 98. But the bigger
the python string notation (str % tuple) would fit really well too...
putStrLn "hello %s, you got %d right" % ("oliver", 5)
Might be nice.
What would be the type of putStrLn then?
The type of putStrLn would remain unchanged.
The idea would be to let the compiler translate the string
"hello
I'm interested to know why a string translating preprocessor doesn't
exist for haskell. It seems to me that it would alleviate printf and
regex like problems in an convenient, elegant and type-safe manner.
An example of this I came across recently was the ocaml printf
statement:
#
On Sun, May 12, 2002, Oliver George wrote:
perl like things...
msg' = replace s/love/lust/ msg
or, nice regex stuff...
main = case match ^(\d+) of
Nothing - 0
Just (i) - i
Ick! regexes can be handled much better than that. Imagine something
17 matches
Mail list logo