Richard A. O'Keefe [EMAIL PROTECTED] writes:
On the subject of data types, I've recently seen Haskell code using
data Foo ... = Foo { ... }
where I would have used newtype instead of data. When is it a good
idea to avoid newtype?
When the code was written before newtype was introduced
ok:
On the subject of data types, I've recently seen Haskell code using
data Foo ... = Foo { ... }
where I would have used newtype instead of data. When is it a good
idea to avoid newtype?
It depends what's in the ...
If its just something with the same representation as an existing
Thanks for your help. It was very useful.
Though in comparison with C or C++ I can't figure out so clear the syntax.
Maybe it has to do with the syntactic Sugar of each Language. I 'll give you a
similar example I saw in a book for Haskel
The following program just returns the value of the
On Feb 10, 2008 3:40 PM, Mattes Simeon [EMAIL PROTECTED] wrote:
Thanks for your help. It was very useful.
Though in comparison with C or C++ I can't figure out so clear the syntax.
Maybe it has to do with the syntactic Sugar of each Language. I 'll give you a
similar example I saw in a book
G'day all.
On Feb 10, 2008 3:40 PM, Mattes Simeon [EMAIL PROTECTED] wrote:
Though in comparison with C or C++ I can't figure out so clear the syntax.
Quoting Victor Nazarov [EMAIL PROTECTED]:
I think this is the most native way to do it in C++:
Herb Sutter and Andrei Alexandrescu will
Mattes Simeon [EMAIL PROTECTED] wrote:
Though in comparison with C or C++ I can't figure out so clear
the syntax...I seems realy strange, and I'm confused.
Surely a solution to this would be to use the standard types
of Haskel for tuples and check out each time if I have just a
number or a