[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Short function definition syntax; thoughts on Lua
- From: Miles Bader <miles@...>
- Date: Fri, 04 Dec 2009 19:31:19 +0900
David Kastrup <dak@gnu.org> writes:
> The one thing that really struck me about Lua is that Lua programs looks
> like Lua. They don't go fancy-syntax fishing elsewhere. That's kind of
> unusual for a script language nowadays.
I agree, in general -- I like Lua syntax, and I don't like things like
attempts to sneak in C-bracey syntax extensions I've seen in the past.
But I think the || syntax for very short anonymous functions is fine.
Just because Lua is, in general, a very "keywordy" language, doesn't
mean it has to _completely_ eschew punctuation -- it uses "+" for
addition after all :) -- and I view || as being exactly in that same
vein, a short expression-oriented syntax, whose main goal is brevity.
[FWIW, I'd also like an ?: operator for in-expression if-else...]
-Miles
--
Monday, n. In Christian countries, the day after the baseball game.
- References:
- [ANN] GSL Shell new beta release with anti-gran graphics module, Francesco Abbate
- Re: [ANN] GSL Shell new beta release with anti-gran graphics module, steve donovan
- Re: [ANN] GSL Shell new beta release with anti-gran graphics module, David Kastrup
- Re: [ANN] GSL Shell new beta release with anti-gran graphics module, Norman Ramsey
- Re: [ANN] GSL Shell new beta release with anti-gran graphics module, David Kastrup
- Re: [ANN] GSL Shell new beta release with anti-gran graphics module, Norman Ramsey
- Short function definition syntax; thoughts on Lua (was Re: [ANN] GSL Shell new beta release...), Doug Rogers
- Re: Short function definition syntax; thoughts on Lua, David Kastrup
- Re: Short function definition syntax; thoughts on Lua, Miles Bader
- Re: Short function definition syntax; thoughts on Lua, David Kastrup