Marcin Kowalczyk:
BTW, before I knew Haskell I exprimented with a syntax in which 'x f'
is the application of 'f' to 'x', and 'x f g' means '(x f) g'. Other
arguments can also be on the right, but in this case with parentheses,
e.g. 'x f (y)' is a function f applied to two arguments.
Hmmm.
Jerzy Karczmarczuk [EMAIL PROTECTED] writes:
BTW, before I knew Haskell I exprimented with a syntax in which 'x f'
is the application of 'f' to 'x', and 'x f g' means '(x f) g'.
Hmmm. An experimental syntax, you say...
Oh, say, you reinvented FORTH?
Wouldn't
x f g
in a Forth'ish
On Tuesday, May 29, 2001, at 04:44 PM, Ketil Malde wrote:
Jerzy Karczmarczuk [EMAIL PROTECTED] writes:
Wouldn't
x f g
in a Forth'ish machine mean
g(f,x) -- using standard math notation, for a change
rather than
g(f(x))
?
In PostScript, a Forth derivative, it
29 May 2001 22:44:38 +0200, Ketil Malde [EMAIL PROTECTED] pisze:
Wouldn't
x f g
in a Forth'ish machine mean
g(f,x) -- using standard math notation, for a change
rather than
g(f(x))
?
It depends whether f changes the value at top of the stack or only
puts
It seems that right-associativity is so intuitive that even the person
proposing it doesn't get it right. :-) Partial applications are a
particular problem:
Haskell Non-Haskell
Left Associative Right Associative
From
S. Alexander Jacobson wrote:
Does anyone know why the haskell designers did not make the syntax
right associative? It would clean up a lot of stuff.
Haskell Non-Haskell
Left AssociativeRight Associative
foo (bar (baz (x)))
At 05:25 PM 5/25/2001 -0400, S. Alexander Jacobson wrote:
Admittedly, this is different from how haskell type checks now. I guess
the question is whether it is impossible to type check or whether it just
requires modification to the type checking algorithm. Does anyone know?
I don't think
Hi, you said
Unfortunately in many cases you need to apply nearly as many
parens for a Haskell expression as you would for a Python one, but
they're in different places. It's not:
foo( bar( baz( x ) ) )
it's:
(foo ( bar (baz x) ) )
Clearly the
Peter Douglass writes:
:
| but in ( foo ( bar (baz x) ) )
|
| You would want the following I think.
|
| foo . bar . baz x
|
| which does have the parens omitted, but requires the composition
| operator.
Almost. To preserve the meaning, the composition syntax would need to
be
Pertti Kellomäki [EMAIL PROTECTED] wrote,
From: Ketil Malde [EMAIL PROTECTED]
Manuel M. T. Chakravarty [EMAIL PROTECTED] writes:
You want to be able to write
f 1 2 + g 3 4
instead of
(f 1 2) + (g 3 4)
I do? Personally, I find it a bit confusing, and I still
For humans, it is quite natural to use
visual cues (like layout) to indicate semantics.
I agree, but let us not try to do that with just two (already overloaded)
symbols.
(let ((a 0)
(b 1))
(+ a b))
let { a = 0; b = 1; } in a + b
is valid Haskell and the way I use
I realize this is a topic where it would be very easy to start a flame
war, but hopefully we can avoid that.
Paul Hudak wrote:
Why not have your tool generate layout-less code? Surely that would be
easier to program, and be less error prone.
The tool in question is Happy, and the error
Manuel M. T. Chakravarty [EMAIL PROTECTED] writes:
You want to be able to write
f 1 2 + g 3 4
instead of
(f 1 2) + (g 3 4)
I do? Personally, I find it a bit confusing, and I still often get it
wrong on the first attempt. The good thing is that the rule is simple
to remember. :-)
of writing a simple program
that did a few simple imperative things inordinately difficult. I know about
the 'do' construct, and I understand the difference between and =. I've
read a book on Haskell, and implemented functional programming support for
Python, but trying to use Haskell to write complete
difficult. I know about
the 'do' construct, and I understand the difference between and =. I've
read a book on Haskell, and implemented functional programming support for
Python, but trying to use Haskell to write complete programs still ties my
brain in knots. I see there are people writing complete
simple imperative things inordinately difficult. I know
about
the 'do' construct, and I understand the difference between and =.
I've
read a book on Haskell, and implemented functional programming support for
Python, but trying to use Haskell to write complete programs still ties my
brain
Two quite interesting articles about FP in Python are over
at IBM developerWorks:
http://www-106.ibm.com/developerworks/library/l-prog.html
http://www-106.ibm.com/developerworks/library/l-prog2.html
Two IMHO interesting things to note are the following:
* In Part 1, at the start, there is
17 matches
Mail list logo