Re: [pure-lang-users] Proposed syntax changes
Status: Beta
Brought to you by:
agraef
From: Albert G. <Dr....@t-...> - 2008-08-15 13:10:50
|
Libor Spacek wrote: > Maybe it is just me but when using Pure, I am always worrying: 'is this a tuple or is it a list?' Ok, I see. But I think that like so many things it's just a matter of practice, getting to know the language. I agree that having an extra tuple type makes things more complex, but, as I tried to point out in a previous post, it also makes some stuff more readable or familiar. If you come from a language like Haskell or Erlang where you're working with tuples all them time, then you'd surely miss them if they weren't provided. Real Lisp men of course don't need all that sugar. ;-) But language design is always a compromise, and every PL is a new exercise to find a certain sweet spot between simplicity, power and convenience. If you leave away everything that's not strictly needed, then you'll end up with combinatorial calculus without any builtins, but who would want to program in such a language? Of course, Pure's tuples being flat is a ... hmm ... speciality that takes some time getting used to. But I wanted to have tuples in Pure for notational convenience, and this was a really cheap way to get them at the cost of just a single infix operator, requiring no builtins at all. So yes, they're an ideosyncrasy, but I dare say that they're also elegant in a way, IMNSHO. > To complicate things further, I can also in many situations use simply 1 2 3, e.g. >> let a = 1 2 3; You don't want to do that. If your first element happens to be a hungry closure then you're busted. :) Cheers, Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |