Sam Hughes wrote:
Brian Hulley wrote:
... For example, with the prefix definition of a function with
multiple clauses, the function name at the start of each clause is
already lined up since it must appear at the margin of the current
layout block ...
Or you could have everything be
On Tue, 25 Sep 2007, Brian Hulley wrote:
Jonathan Cast wrote:
Of course, this is all a consequence of the well-known failure of
natural language: verbs come before their objects. It is thus natural
to write f(x), when in fact it is the object that should come first, not
the function.
On Tue, 25 Sep 2007, Brian Hulley wrote:
To be consistent this would also have to apply to the use of (-) in types to
get:
a - b === (-) b a
Since there are many type class instances for the Reader Monad, in this
case the order of argument seems to be appropriate.
On Tue, 25 Sep 2007, Dan Piponi wrote:
It's not so clear to me what the syntax for types should be in a postfix
language.
Postfix, of course! So you'd write
data a Tree = Leaf | a a Tree
Confusingly, ocaml does something like this, with postfix notation for
types and prefix notation for
On Tue, 25 Sep 2007, Brian Hulley wrote:
Of course the problem disappears if you just discard multiple clause syntax
and use:
(list :: a List) (f :: a - b) map :: b List =
case list of
Empty - Empty
h t PushF - (h f) (t f map) PushF
This would also have the
On Tue, 25 Sep 2007, Brian Hulley wrote:
Ryan Ingram wrote:
A couple off the top of my head:
(:) :: a - [a] - [a]
Yes that's one that had totally slipped my mind ;-)
I like to add 'div' and 'mod' as examples for wrong argument order.
___
On 26 Sep 2007, at 8:32 am, Brian Hulley wrote:
Aha! but this is using section syntax which is yet another
complication. Hypothesis: section syntax would not be needed if the
desugaring order was reversed.
Binary operators have two arguments. That's why sections are needed.
This is one of
Hi,
I'm in the process of designing a little language inspired by Haskell
but imperative, and have hit an issue regarding infix syntax which may
be of interest also to anyone thinking about future revisions of Haskell
or the problem of consistent parameter order in libraries.
I'm wondering
Brian Hulley wrote:
I'm wondering if anyone can shed light on the reason why
x # y
gets desugared to
(#) x y
and not
(#) y x
Can anyone think of an example where the current desugaring of infix
arguments gives the correct order when the function is used in a
postfix application?
On Tue, 2007-09-25 at 19:18 +0100, Brian Hulley wrote:
Brian Hulley wrote:
I'm wondering if anyone can shed light on the reason why
x # y
gets desugared to
(#) x y
and not
(#) y x
Can anyone think of an example where the current desugaring of infix
arguments
Wise your proposal is. Too long the desugaring I of languages functional
not understanding have labored. Anastrophe the rule should be. Working
have I been on a language Yoda that these rules implements it aspires to.
If the lojban/loglan schism is any precedent, Yoda will split soon
enough
My comments inlined below...
On 9/25/07, Brian Hulley [EMAIL PROTECTED] wrote:
let
shiftLeftByThree = shiftL' 3
in
map shiftLeftByThree [10, 78, 99, 102]
let shiftLeftByThree = (`shiftL` 3) in ...
Can anyone think of an example where the current desugaring of infix
Jonathan Cast wrote:
On Tue, 2007-09-25 at 19:18 +0100, Brian Hulley wrote:
Brian Hulley wrote:
I'm wondering if anyone can shed light on the reason why
x # y
gets desugared to
(#) x y
and not
(#) y x
Of course, this is all a consequence of the well-known failure
On 9/25/07, Brian Hulley [EMAIL PROTECTED] wrote:
...I seem to dimly recall that there is a natural language
somewhere that also uses it but I can't remember which one.
Every permutation of [S,V,O] appears in 'nature':
http://en.wikipedia.org/wiki/Word_order.
Also, a problem might be that it
Ryan Ingram wrote:
My comments inlined below...
On 9/25/07, Brian Hulley [EMAIL PROTECTED] wrote:
let
shiftLeftByThree = shiftL' 3
in
map shiftLeftByThree [10, 78, 99, 102]
let shiftLeftByThree = (`shiftL` 3) in ...
Aha! but this is using section syntax which is
Dan Piponi wrote:
On 9/25/07, Brian Hulley [EMAIL PROTECTED] wrote:
..I seem to dimly recall that there is a natural language
somewhere that also uses it but I can't remember which one.
Every permutation of [S,V,O] appears in 'nature':
http://en.wikipedia.org/wiki/Word_order.
Thanks
Brian Hulley wrote:
Dan Piponi wrote:
On 9/25/07, Brian Hulley [EMAIL PROTECTED] wrote:
..
I don't understand what you mean. For example, with the prefix
definition of a function with multiple clauses, the function name at the
start of each clause is already lined up since it must appear
17 matches
Mail list logo