Don Stewart wrote:
bulat.ziganshin:
Hello circ,

Thursday, November 27, 2008, 9:59:08 PM, you wrote:
So why not {"hello": 1, "there": 2} ?
mymap "hello:1 there:2"

where mymap implementation is left to the reader :)

I can't see the context of the beginning of this thread, but I've always found:

fromList [("hello",1),("there",2)]

to be a relatively simple syntax, and still checked at compile time.

Anonymous sum + product types plus lists are a pretty good approximation for lots of concrete syntax, and they're type checks.

(Anonymous sum, Either, is slightly more syntactically heavy than you'd like, though...)

Jules
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to