[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: Sat, 27 Nov 2010 02:48:12 +0100
On Sat, Nov 27, 2010 at 02:22, Mark Hamburg <mark@grubmah.com> wrote:
>> concat = |:a||:b||:c: print(a.." "..b.." "..c.."!") :|:|:|
>
> I think this probably lends credence to everyone who yells "line noise!"
If by noise, you mean that the syntax obfuscates the meaning, I
disagree. The parameters are clearly visible without any space around
them, it's obvious that we're creating three nested functions,, and
the three closing tokens are unmissable too.
compare with
concat = function (a)
return function (b)
return function (c)
print( a.." "..b.." "..c.."!" )
end
end
end
If the former is line noise, the latter is surface sludge. The SNR is
much higher above. In the second case, the function/return keywords
dominate.
-- Pierre-Yves
- References:
- Re: Re: Re: Lightweight syntax: a dissident view, Gunnar Zötl
- Re: Re: Re: Lightweight syntax: a dissident view, Luis Carvalho
- Re: Re: Re: Lightweight syntax: a dissident view, Axel Kittenberger
- Re: Re: Re: Lightweight syntax: a dissident view, Pierre-Yves Gérardy
- Re: Re: Re: Lightweight syntax: a dissident view, Roberto Ierusalimschy
- Re: Re: Re: Lightweight syntax: a dissident view, Mateusz Czaplinski
- Re: Re: Re: Lightweight syntax: a dissident view, Axel Kittenberger
- Re: Lightweight syntax: a dissident view, Philippe Lhoste
- Re: Lightweight syntax: a dissident view, Pierre-Yves Gérardy
- Re: Lightweight syntax: a dissident view, Mark Hamburg
- Re: Lightweight syntax: a dissident view, Pierre-Yves Gérardy
- Re: Lightweight syntax: a dissident view, Pierre-Yves Gérardy
- Re: Lightweight syntax: a dissident view, Axel Kittenberger
- Re: Lightweight syntax: a dissident view, steve donovan
- Re: Lightweight syntax: a dissident view, phlnc8
- Re: Lightweight syntax: a dissident view, Doug Lua
- Re: Lightweight syntax: a dissident view, Pierre-Yves Gérardy
- Re: Lightweight syntax: a dissident view, Doug Lua
- Re: Lightweight syntax: a dissident view, Pierre-Yves Gérardy
- Re: Lightweight syntax: a dissident view, Pierre-Yves Gérardy
- Re: Lightweight syntax: a dissident view, Mark Hamburg