lua-users home
lua-l archive

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

I would like add my support of Nick Trouts views. 
Leave it alone.
David Burgess

>> > > It's not a big deal, but I'm curious. Is there any intention of
>> > > including '!=' as an alternative to '~='? I was even thinking
>> > > about including that locally myself, but it would be very nice
>> > > if the standard syntax supported it as well.
>> >
>> > I don't think there is any intention of doing this. You can make the
>> > change easily, I think its only one character. But, as soon as you
>do it
>> > you don't have Lua, you have another language.
>> Yep.. that's the point. But if I advertise it as another language, Lua
>> loses. If I make no change in that regard, users are losing since
>> that's the most usual 'not equal' operator (C, Python, Perl, Ruby,
>> Shell, etc).
>> I see no point in not doing such an easy addition.
>> > Lua is not C!
>> Oh, thank you. I wasn't aware about this. :-)
>Good job I pointed it out then! :-)
>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
>> > IMHO if it was to be changed "~=" should be abandoned and all code
>> > changed over to "!=". Having two optional forms of ~= would be
>> 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.
>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.
>Regards, (my 2p :)