lua-users home
lua-l archive

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

> Finally, something in this crazy thread I care about. :-)


> I'd love to be able to define operators within the language.  Yes this
> is a slight pain for the parser, but not terribly so since an
> "operator" would just be defined as some sequence of one or more
> characters from a particular defined set.  Well, OK, unary operators
> introduce issues with distinguishing chains of operations from a
> multiple character operator, and there's the whole deduction of unary
> vs. binary vs. even higher orders.  But, hey lots of this already had
> to be handled because of the built in operators (OK that's still an
> oversimplification, but I'd REALLY like this).

I don't personally like this idea, since IMO it'd introduce
additional unnecessary bloat in a language which is meant to
be minimal. But that's another discussion, and I won't take
it further.

> So, what's the hook to this thread?
> Simple, != could replace ~= (in a major version release of course) and ~=
> could be mapped to != by a compatibility script.  Cheers :-)

I don't see why it'd need a major release for this simple
addition. It won't break any code, nor introduce incertainties.

Gustavo Niemeyer