[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: ~= vs. !=
- From: "Andrew Durdin" <andy@...>
- Date: Thu, 27 Nov 2003 22:58:32 +1100
Nick Trout wrote:
>I can see the merit of adding "#" for comments (well, the first line
>anyway) so you can write Lua shell scripts, but "--" seems fine to me.
>When do these optional syntax changes end? There was a request for
>optional "do" as well. The syntax seems to have settled a little now but
>adding lots of optional syntax could just make Lua more cryptic in the
>future. If it ain't broken, don't fix it. -- That's just my opinion, if
>the majority want != then I'm not going to stand in anybodys way but
>let's just have one != operator.
I really don't see any need to support the use of # just to allow the use of
shell scripts -- surely it'd be simple enough to write a program (call it
luashell for example) that would just take the input file and pass all but
the first line to lua, so that the hash-bang in the lua scripts would be:
That would allow lua scripts to be used for shell scripting without needing
any changes to Lua at all, and would not have any significant overhead.
As far as the rest goes, I prefer -- to # in general (no shifting needed,
and I think it looks better), and also prefer != to ~=, not least because
it's easier to type on my laptop (~ being in an awkward location between Alt
*returning to lurk mode*