POV-Ray : Newsgroups : povray.off-topic : Why is Haskell interesting? : Re: Why is Haskell interesting? Server Time
4 Sep 2024 19:17:18 EDT (-0400)
  Re: Why is Haskell interesting?  
From: Orchid XP v8
Date: 27 Feb 2010 18:09:19
Message: <4b89a61f$1@news.povray.org>
Darren New wrote:

> I would guess it makes the thing into an infix operator, while x[y] is 
> neither prefix, postfix, infix, or ... whatever.

The word you're looking for is apparently "mixfix".

> Plus, list literals are [ ... ], so I'm guessing that x [ y ] is 
> ambiguous as to whether you're calling function x with an argument 
> htat's a one-element list containing y.

Yeah. Although like I said in my other reply, they already made 
whitespace significant in the case of the "." character. I'm guessing 
this one's a historical accident.

> Now, why they picked ! instead of (say) @ is beyond me.

That would have been a better choice, but it's already taken. (And not 
even by another library function - it's actually *reserved* in the 
syntax rules.)

You could have had "@@", but they chose "!" for whatever reason...

Then again, this is the same language that gives you "^" and "**". Wanna 
take a guess what the difference is?

Haskell is a brilliant language, but I never said it was perfect. ;-)

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.