[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lightweight syntax: a dissident view
- From: Pierre-Yves Gérardy <pygy79@...>
- Date: Thu, 25 Nov 2010 12:11:03 +0100
On Thu, Nov 25, 2010 at 11:19, Philippe Lhoste <PhiLho@gmx.net> wrote:
> Typing on French keyboards, I feel that, although all the programming keys
> ~#{[|`\@]} must use a special gymnastics (AltGr + upper row (number) key). `
> and ~ are worse as they are dead keys (on Windows) so need an extra space to
> make them appear.
On the Mac Belgian keyboard, they []|\ require a three keys chord
(Alt+Shift), and ~ is a dead key, as is ^, but @ and # are easier to
type than on Windows.
I'm thinking of switching to blind US-QWERTY like Wim Langers.
> When I see Luiz' example of \x,y,z(x+(x-2)*g(x,y,z-2*(x+y))-y*z)
> I have some hard time to see it as a function definition with parameters...
It is actually inspired by the mathematical notation for lambda
calculus as defined by Church[1], adapted to ASCII and the Lua
grammar.
λxyf.f x y ==> \x,y,f ( f(x,y) )
&x,y,f( f(x,y) ) is also visually close to λ but it is also
semantically loaded and would conflict with a patch implementing a '&'
and '|' as infix operator for boolean arithmetic.
This leaves us with '@', '$' and '\'. The first two are Perlish. The
last one is a bit shallow, visually. There no obvious candidate...
One more candidate:
`do` `[` args `]` chunk `end`
with a short return token wouldn't be too bad. It looks more like the
usual Lua syntax.
-- Pierre-Yves
1. http://en.wikipedia.org/wiki/Lambda_calculus