I agree that fromList or pattern matching at the function or case level are
readable. We probably don't need new sugar. For what it's worth, in scala
you can use "->" to construct tuples, so you'll sometimes see maps created
like this:
Map(1 -> "one", 2 -> "two", 3 -> "foo")
You can always do som
> Sorry, I forgot to explain (probably because I'm too used to it). I am
referring to a syntax for easy creation of maps. Something equivalent to
lists:
>
> to build a list: [ 1, 2, 3]
> to build a map; { 1, "one", 2, "two", 3, "three"}
>
> Without it I am always forced to use fromList.
This looks
Sorry, I forgot to explain (probably because I'm too used to it). I am
referring to a syntax for easy creation of maps. Something equivalent to
lists:
to build a list: [ 1, 2, 3]
to build a map; { 1, "one", 2, "two", 3, "three"}
Without it I am always forced to use fromList.
Răzvan
On 27 Marc
On Wed, 2013-03-27 at 21:30 +0200, Răzvan Rotaru wrote:
> I am terribly missing some syntactic sugar for maps (associative data
> structures) in Haskell. I find myself using them more than any other
> data
> structure, and I think there is no big deal in adding some sugar for
> this
> to the langua
I'm genuinely curious as to how you use maps. I've found I use them far
less in Haskell than in any other language: I only use them in select
circumstances. And most of those uses would not benefit from a mayo literal.
I suspect that many of the uses of map literals are better replaced with
someth
On 28 March 2013 06:30, Răzvan Rotaru wrote:
> Hi,
>
> I am terribly missing some syntactic sugar for maps (associative data
> structures) in Haskell. I find myself using them more than any other data
> structure, and I think there is no big deal in adding some sugar for this to
> the language. I
Hi,
I am terribly missing some syntactic sugar for maps (associative data
structures) in Haskell. I find myself using them more than any other data
structure, and I think there is no big deal in adding some sugar for this
to the language. I could not find out whether such an extension is beeing
di