Re: [Haskell-cafe] Custom unary operator extension?

2007-09-10 Thread Peter Verswyvelen
Thanks for the advice. Well, if I wanted to use a language with rich mathematical symbol support, I would use Sun's Fortress, which allows any unicode character. But that language is scheduled to be released by 2010, if it gets released. An interpreter is available though. But I'll stick to

Re: [Haskell-cafe] Custom unary operator extension?

2007-09-10 Thread Michael Vanier
APL is fairly obsolete now anyway. A more modern version of that language is J (www.jsoftware.com), which does not use special characters. I've studied the language a bit, and it's quite interesting, but it really doesn't offer much (anything?) over Haskell except a much terser notation and sim

Re: [Haskell-cafe] Custom unary operator extension?

2007-09-10 Thread Peter Verswyvelen
Nice. Thanks for the info, but the symbolic notation is not the only reason for using Haskell, it's also to force them into solving simple problems without using mutable variables, so they see this alternative functional programming approach BEFORE they are specialist in C++, because then they

RE: [Haskell-cafe] Custom unary operator extension?

2007-09-10 Thread Simon Peyton-Jones
Incidentally, GHC does allow postfix unary operators. http://www.haskell.org/ghc/docs/latest/html/users_guide/syntax-extns.html#postfix-operators Simon ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haske

Re: [Haskell-cafe] Custom unary operator extension?

2007-09-10 Thread Henning Thielemann
On Sun, 9 Sep 2007, Peter Verswyvelen wrote: Henning Thielemann wrote: The more syntactic constructs exist, the more complicated it becomes to read such programs. Today, if you read a symbolic operator which is not "-", not a single dot with a capital identifier to the left (qualification),

Re: [Haskell-cafe] Custom unary operator extension?

2007-09-09 Thread Peter Verswyvelen
Henning Thielemann wrote: The more syntactic constructs exist, the more complicated it becomes to read such programs. Today, if you read a symbolic operator which is not "-", not a single dot with a capital identifier to the left (qualification), not a double dot in a bracket (enumeration) and

Re: [Haskell-cafe] Custom unary operator extension?

2007-09-09 Thread Henning Thielemann
On Sun, 9 Sep 2007, Peter Verswyvelen wrote: Why? What is your application? In fact, alphanumeric identifiers are used as unary operators. Why? Well, why are binary operators allowed and unary operators not? Isn't that some kind of discrimination? In math, many many operators are unary. Haske

Re: [Haskell-cafe] Custom unary operator extension?

2007-09-09 Thread Peter Verswyvelen
Malcolm Wallace wrote: Incidentally, the nhc98 compiler has always permitted the definition of unary operators, as an extension to the language. (It was just more convenient to create a general mechanism for unary/prefix operators, than to code the special case for negative numbers.) Cool! I fou

Re: [Haskell-cafe] Custom unary operator extension?

2007-09-09 Thread Peter Verswyvelen
Brandon S. Allbery KF8NH wrote: On Sep 9, 2007, at 9:09 , Peter Verswyvelen wrote: I think that the benefits of prefix or postfix symbolic operators were not worth dispensing with the comfortable section syntax. Well, that's personal I guess, but I would prefer the syntax (? / 100) and (100 /

Re: [Haskell-cafe] Custom unary operator extension?

2007-09-09 Thread Derek Elkins
On Sun, 2007-09-09 at 15:09 +0200, Peter Verswyvelen wrote: > > Why? What is your application? In fact, alphanumeric identifiers are > > used as unary operators. > Why? Well, why are binary operators allowed and unary operators not? > Isn't that some kind of discrimination? In math, many many ope

Re: [Haskell-cafe] Custom unary operator extension?

2007-09-09 Thread Malcolm Wallace
> On Sun, 9 Sep 2007, Peter Verswyvelen wrote: > > > I find it unfortunate that one can't (I guess) define custom unary > > operators in Haskell. Incidentally, the nhc98 compiler has always permitted the definition of unary operators, as an extension to the language. (It was just more convenient

Re: [Haskell-cafe] Custom unary operator extension?

2007-09-09 Thread Brandon S. Allbery KF8NH
On Sep 9, 2007, at 9:09 , Peter Verswyvelen wrote: I think that the benefits of prefix or postfix symbolic operators were not worth dispensing with the comfortable section syntax. Well, that's personal I guess, but I would prefer the syntax (? / 100) and (100 / ?), which is just a single extr

Re: [Haskell-cafe] Custom unary operator extension?

2007-09-09 Thread Peter Verswyvelen
Why? What is your application? In fact, alphanumeric identifiers are used as unary operators. Why? Well, why are binary operators allowed and unary operators not? Isn't that some kind of discrimination? In math, many many operators are unary. Haskell allows creating binary operators. So I woul

Re: [Haskell-cafe] Custom unary operator extension?

2007-09-09 Thread Henning Thielemann
On Sun, 9 Sep 2007, Peter Verswyvelen wrote: I find it unfortunate that one can't (I guess) define custom unary operators in Haskell. Why? What is your application? In fact, alphanumeric identifiers are used as unary operators. Is this correct? If so, is this just because eg (* 100) decla

[Haskell-cafe] Custom unary operator extension?

2007-09-09 Thread Peter Verswyvelen
I find it unfortunate that one can't (I guess) define custom unary operators in Haskell. Is this correct? If so, is this just because eg (* 100) declares a function that partially applies the * operator, so this syntax disallows unary operators? Could this be fixed by introducing a different