lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> The point is that Lua is Lua and all languages are different. I've
> encountered people who
> 
> #define Begin {
> #define End }
> 
> in C so they can program like Pascal. Then you end up with some hideous
> half way solution which other people find difficult to maintain. Don't
> try and turn one language into another, it's a mistake, you'll end with
> Perl.

I'm not asking to change this operator just because "it's not like my
favorite language". I'm asking because this *specific* operator is
*unusual*. Don't generalize the request, please.

Also, the point here is not just "Hey, Lua is like this, learn it.".
I'm embedding Lua in a few standard softwares which are used by a
lot of people. It'd be very nice if something as simple as the
'not equal' operator was the same they know in every other language
they have heard of.

> > Breaking compatibility with older scripts would be even sillier.
> 
> But scripts were broken when we went to 5.0. Core functions were put in
> tables, upvalues were removed and we have metamethods instead of tags.
> How is this different? Avoiding all these optional elements is how you
> keep a language small and simple.

Ohh.. so the idea is "Let's break scripts in every version"? Perhaps
I'm using the wrong language then.

> 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
[...]

Requests will never end. It's up to the maintainers to understand
what should and shouldn't be done. Saying "let's not change the
'not equal' operator because people will want to change something
else" is unlogical to me.

-- 
Gustavo Niemeyer
http://niemeyer.net