Re: Suggestion: Syntactic sugar for Maps!

2008-11-27 Thread John Meacham
On Thu, Nov 27, 2008 at 07:59:08PM +0100, circ ular wrote: > I suggest Haskell introduce some syntactic sugar for Maps. > > Python uses {"this": 2, "is": 1, "a": 1, "Map": 1} > > Clojure also use braces: {:k1 1 :k2 3} where whitespace is comma but > commas are also allowed. > > I find the import

Re: Suggestion: Syntactic sugar for Maps!

2008-11-27 Thread Isaac Dupree
Thomas Davie wrote: On 27 Nov 2008, at 19:59, circ ular wrote: I suggest Haskell introduce some syntactic sugar for Maps. Python uses {"this": 2, "is": 1, "a": 1, "Map": 1} Clojure also use braces: {:k1 1 :k2 3} where whitespace is comma but commas are also allowed. I find the import Data.M

Re: .. Add simonpj's ImportShadowing proposal

2008-11-27 Thread Isaac Dupree
http://hackage.haskell.org/trac/haskell-prime/wiki/ImportShadowing I agree. It is very tiresome and confusing, because when you say, in your module "M", "M.nub", M doesn't necessarily even export nub, nor did you "import M as M", so it's an odd sort of self-reference. Also that self-referenc

Re: Suggestion: Syntactic sugar for Maps!

2008-11-27 Thread Wolfgang Jeltsch
Am Donnerstag, 27. November 2008 22:14 schrieb Thomas Davie: > On 27 Nov 2008, at 19:59, circ ular wrote: > > I suggest Haskell introduce some syntactic sugar for Maps. > > > > Python uses {"this": 2, "is": 1, "a": 1, "Map": 1} > > > > Clojure also use braces: {:k1 1 :k2 3} where whitespace is comm

Re: Suggestion: Syntactic sugar for Maps!

2008-11-27 Thread Thomas Davie
On 27 Nov 2008, at 19:59, circ ular wrote: I suggest Haskell introduce some syntactic sugar for Maps. Python uses {"this": 2, "is": 1, "a": 1, "Map": 1} Clojure also use braces: {:k1 1 :k2 3} where whitespace is comma but commas are also allowed. I find the import Data.Map and then fromList

Re: Suggestion: Syntactic sugar for Maps!

2008-11-27 Thread 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 :) -- Best regards, Bulatmailto:[EMAIL PROTECTED]

Re: Suggestion: Syntactic sugar for Maps!

2008-11-27 Thread Lennart Augustsson
If we introduce map syntax it should be overloaded. Just as list syntax should be (and will be once I get some time to do it). -- Lennart On Thu, Nov 27, 2008 at 7:10 PM, Don Stewart <[EMAIL PROTECTED]> wrote: > dons: >> circularfunc: >> > I suggest Haskell introduce some syntactic sugar for Ma

Re: Suggestion: Syntactic sugar for Maps!

2008-11-27 Thread Don Stewart
dons: > circularfunc: > > I suggest Haskell introduce some syntactic sugar for Maps. > > > > Python uses {"this": 2, "is": 1, "a": 1, "Map": 1} > > > > Clojure also use braces: {:k1 1 :k2 3} where whitespace is comma but > > commas are also allowed. > > > > I find the import Data.Map and then fr

Re: Suggestion: Syntactic sugar for Maps!

2008-11-27 Thread Don Stewart
circularfunc: > I suggest Haskell introduce some syntactic sugar for Maps. > > Python uses {"this": 2, "is": 1, "a": 1, "Map": 1} > > Clojure also use braces: {:k1 1 :k2 3} where whitespace is comma but > commas are also allowed. > > I find the import Data.Map and then fromList [("hello",1), ("t

Suggestion: Syntactic sugar for Maps!

2008-11-27 Thread circ ular
I suggest Haskell introduce some syntactic sugar for Maps. Python uses {"this": 2, "is": 1, "a": 1, "Map": 1} Clojure also use braces: {:k1 1 :k2 3} where whitespace is comma but commas are also allowed. I find the import Data.Map and then fromList [("hello",1), ("there", 2)] or the other form t