Re: Prefix and postfix operators

2003-09-09 Thread Marcin 'Qrczak' Kowalczyk
Dnia ro 27. sierpnia 2003 20:48, Eugene Nonko napisa:

 Are there any plans to extend Haskell parser to support prefix and
 postfix operators? It will be just great for domain-specific languages.
 It always kind of bothered me that unary minus is special.

Having only infix operators has the advantage that operators are never 
adjacent to other operators, so you don't need extra spaces just to 
separate them nor complicated lexical conventions which tell where 
multi-character operator sequences should be split. Especially as prefix 
and postfix operators look better without spaces.

In Haskell there are rare troubles because of - and ~ (lazy patterns).
! (strictness annotations) happens not to be used adjacent to operators.
I think there are no more unary operators, so it's almost safe; problematic 
cases with - and ~ are really rare.

-- 
   __( Marcin Kowalczyk
   \__/   [EMAIL PROTECTED]
^^ http://qrnik.knm.org.pl/~qrczak/

___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe


Prefix and postfix operators

2003-08-27 Thread Eugene Nonko
Title: Prefix and postfix operators






Hello,


Are there any plans to extend Haskell parser to support prefix and postfix operators? It will be just great for domain-specific languages. It always kind of bothered me that unary minus is special.

Thanks,

Eugene