Brian Hulley [EMAIL PROTECTED] writes:
My final suggestion if anyone is interested is as follows:
1) Use : for types
2) Use , instead of ; in the block syntax so that all brace blocks
can be replaced by layout if desired (including record blocks)
3) Use ; for list cons. ; is already used
On 2006-02-04 at 21:15GMT Brian Hulley wrote:
Stefan Holdermans wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Brian wrote:
I think the mystery surrounding :: and : might have been that
originally people thought type annotations would hardly ever be
needed whereas list cons
Jon Fairbairn wrote:
Brian Hulley wrote:
snip
Not exactly alone; I've felt it was wrong ever since we
argued about it for the first version of Haskell. : for
typing is closer to common mathematical notation.
But it's far too late to change it now.
- it's just syntax after all
Well I'm
Tomasz Zielonka wrote:
The only problem I see right now is related to change locality. If I
have a chain like this:
f x y .
g x $
z
and I want to add some transformation between g and z I have to
change one line and insert another
f x y .
g x .
h x y $
z
With
Tomasz Zielonka wrote:
On Sun, Feb 05, 2006 at 01:14:42PM -, Brian Hulley wrote:
How about:
f x y
. g x
$ z
then you only need to add the line
. h x y
But then you have a problem when you when you want to add something
at the beginning ;-) With right-assoc $ adding
On Sun, Feb 05, 2006 at 04:36:44PM -, Brian Hulley wrote:
Just in case you are interested, in the preprocessor I'm writing, I would
write these examples as:
(.) #
f x y
g x
h x y
$ z
and
a = #[
On Sun, Feb 05, 2006 at 01:10:24PM -, Brian Hulley wrote:
2) Use , instead of ; in the block syntax so that all brace blocks can
be replaced by layout if desired (including record blocks)
Wouldn't it be better to use ; instead of , also for record syntax?
Best regards
Tomasz
--
I am
Tomasz Zielonka wrote:
On Sun, Feb 05, 2006 at 01:10:24PM -, Brian Hulley wrote:
2) Use , instead of ; in the block syntax so that all brace
blocks can be replaced by layout if desired (including record blocks)
Wouldn't it be better to use ; instead of , also for record syntax?
I
Tomasz Zielonka wrote:
On Sun, Feb 05, 2006 at 04:36:44PM -, Brian Hulley wrote:
Just in case you are interested, in the preprocessor I'm writing,
I would write these examples as:
(.) #
f x y
g x
h x y
$ z
and
a =
Brian Hulley wrote:
Tomasz Zielonka wrote:
On Sat, Feb 04, 2006 at 02:52:20PM -, Brian Hulley wrote:
Hi -
In the Haskell98 report section 4.4.2 $ is specified as being right
associative. This means that f $ a0 a1 $ b0 b1 would parse as f (a0
a1 (b0 b1)) which seems rather strange to me.
On Sat, Feb 04, 2006 at 07:15:47PM -, Brian Hulley wrote:
I think the mystery surrounding :: and : might have been that
originally people thought type annotations would hardly ever be needed
whereas list cons is often needed, but now that it is regarded as good
practice to put a type
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Brian wrote:
I think the mystery surrounding :: and : might have been that
originally people thought type annotations would hardly ever be needed
whereas list cons is often needed, but now that it is regarded as good
practice to put a type
Tomasz Zielonka wrote:
On Sat, Feb 04, 2006 at 07:15:47PM -, Brian Hulley wrote:
I think the mystery surrounding :: and : might have been that
originally people thought type annotations would hardly ever be
needed whereas list cons is often needed, but now that it is
regarded as good
Stefan Holdermans wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Brian wrote:
I think the mystery surrounding :: and : might have been that
originally people thought type annotations would hardly ever be
needed whereas list cons is often needed, but now that it is
regarded as good
Actually, one of the main reasons that we chose (:) is that that's what
Miranda used. So, at the time at least, it was not entirely clear what
the de facto universal inter-language standard was.
In any case, I agree with Stefan regarding Haskell Prime!
-Paul
Stefan Holdermans wrote:
On 04/02/06, Brian Hulley [EMAIL PROTECTED] wrote:
Stefan Holdermans wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Brian wrote:
I think the mystery surrounding :: and : might have been that
originally people thought type annotations would hardly ever be
needed whereas list
[a,b,c ; tail] === a :: b :: c :: tail -- where ::
How is [a,b,c ; tail] simpler, clearer or less typing than
a:b:c:tail ? I think that the commas and semicolons are easy to
confuse.
While we're talking about the aesthetics of :: and :, I like how a
line with a
Brian Hulley wrote:
Jared Updike wrote:
[a,b,c ; tail] === a :: b :: c :: tail --
where ::
How is [a,b,c ; tail] simpler, clearer or less typing than
a:b:c:tail ? I think that the commas and semicolons are easy to
confuse.
It seems strange that you can write
On Sat, 2006-02-04 at 23:34 +, Chris Kuklewicz wrote:
. . .
But this implies [a,b,c,[]..] is the same as [a,b,c] and [a,b,c,[d,e,f]..] is
the same as [a,b,c,d,e,f] and [a,b,c,[d,e,f..]..] is [a,b,c,d,e,f..]
Hmmm, does this get us to difference lists ala Prolog?
-- Bill Wood
G'day all.
Quoting Paul Hudak [EMAIL PROTECTED]:
Actually, one of the main reasons that we chose (:) is that that's what
Miranda used. So, at the time at least, it was not entirely clear what
the de facto universal inter-language standard was.
Exactly. One point that's often not
[EMAIL PROTECTED] wrote:
G'day all.
Quoting [EMAIL PROTECTED]:
This is the way that I normally express it. Partly because I find
function application FAR more natural than right-associative
application,
I meant to say that I find function COMPOSITION more natural than
right-associative
These lineages are more or less right, except that there is a bit of
incest: LML is certainly one of the progenitors of Haskell. (more
semantically than syntactically, though)
Cheers,
--Joe
[EMAIL PROTECTED] said:
G'day all.
Quoting Paul Hudak [EMAIL PROTECTED]:
Actually, one of the main
22 matches
Mail list logo