[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Function calls [was: Lua and Neko comparison]
- From: "Alex Queiroz" <asandroq@...>
- Date: Fri, 29 Sep 2006 17:22:58 -0300
Hallo,
On 9/29/06, Glenn Maynard <glenn@zewt.org> 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
associativity:
infixl 10 ($=) -- infix operator, associates left, precedence 10
($=) :: Int -> Int -> Int
a $= b = a + b
--
-alex
http://www.ventonegro.org/