lua-users home
lua-l archive

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


On 9/29/06, Glenn Maynard <> wrote:
Not all means of "extending" languages (in the sense you're using here)
are bad; many of them aren't, in fact.  Operator overloading can be
abused (and frequently is), but it isn't defining new tokens and
precedences; I think this is at a new level.

    This is not really new. In Haskell you can define new operators,
which are infix functions, and specify their precedence and

infixl 10 ($=)  -- infix operator, associates left, precedence 10
($=) :: Int -> Int -> Int
a $= b = a + b