Re: Could be my favourite improvement in 1.4

2012-10-10 Thread Jonathan Fischer Friberg
On Thu, Jan 19, 2012 at 8:50 PM, Jeremy Heiler wrote: > On Tue, Dec 20, 2011 at 2:05 AM, Alan Malloy wrote: > > I agree, this horrifies me. It isn't even as simple as "letting them > > be whitespace", because presumably you want (read-string "{a: b}") to > > result in (hash-map 'a 'b), but (read-

Re: Could be my favourite improvement in 1.4

2012-10-10 Thread Rik Diede
I'm glad this issue caught my eye. I disagree with this change as well, and I hope it will be reconsidered (see alternative solution below). I strongly agree with what is already said on the JIRA page by Joseph Smith. What syntaxes will we support? Do we add the latest and greatest from a few

Re: Could be my favourite improvement in 1.4

2012-01-19 Thread Jeremy Heiler
On Tue, Dec 20, 2011 at 2:05 AM, Alan Malloy wrote: > I agree, this horrifies me. It isn't even as simple as "letting them > be whitespace", because presumably you want (read-string "{a: b}") to > result in (hash-map 'a 'b), but (read-string "{a :b}") to result in > (hash-map 'a :b). So you can't

Re: Could be my favourite improvement in 1.4

2012-01-18 Thread Jonathan Cardoso
brain fart lol -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send

Re: Could be my favourite improvement in 1.4

2012-01-18 Thread Tavis Rudd
On Jan 16, 2:23 pm, Justin Steward wrote: > On Tue, Jan 17, 2012 at 5:19 AM, Tavis Rudd wrote: > > {"v":, 1234} > > Except that's not valid JSON, so it's still not a simple cut and paste > solution. I personally think that confusing a colon with whitespace > under any circumstances is an unnece

Re: Could be my favourite improvement in 1.4

2012-01-17 Thread Justin Steward
On Tue, Jan 17, 2012 at 5:19 AM, Tavis Rudd wrote: > {"v":, 1234} Except that's not valid JSON, so it's still not a simple cut and paste solution. I personally think that confusing a colon with whitespace under any circumstances is an unnecessary confusion leading to unnecessary errors. ~Justin

Re: Could be my favourite improvement in 1.4

2012-01-16 Thread Alex Baranosky
This seems like a strange special case. What percentage of users need to paste JSON into the REPL? Of those users, what percentage of the time do they need to do this? On Mon, Jan 16, 2012 at 1:19 PM, Tavis Rudd wrote: > This issue could be avoided by only treating a colon as whitespace when >

Re: Could be my favourite improvement in 1.4

2012-01-16 Thread Tavis Rudd
This issue could be avoided by only treating a colon as whitespace when followed by a comma. As easy cut-paste of json seems to be the key motivation here, the commas are going to be there anyway: valid {"v":, 1234} vs syntax error {a-key: should-be-a-keyword}. -- You received this message bec

Re: Could be my favourite improvement in 1.4

2011-12-22 Thread Julien Kirch
for these cases wouldn't be simpler to paste the map in a string and to create a function that could parse such a json-compatible map into a clojure map ? A. On Dec 20, 2011, at 1:36 PM, Alex Baranosky wrote: > For what it's worth, I think colon's as whitespace in maps adds confusion, > witho

Re: Could be my favourite improvement in 1.4

2011-12-20 Thread Alan Malloy
Well, that would be sufficient if we had HEREDOCs like Alex asked for, but surrounding some JSON with ""s will usually break. On Dec 20, 5:28 am, jweiss wrote: > Even if they did, it's pretty easy to surround the paste with (read- > json "... "). > > On Dec 20, 10:36 am, Alex Baranosky > wrote:

Re: Could be my favourite improvement in 1.4

2011-12-20 Thread Laurent PETIT
Anyway, the issue has not even the start of an argumentation, use case, or whatever ... 2011/12/20 jweiss : > Even if they did, it's pretty easy to surround the paste with (read- > json "... "). > > On Dec 20, 10:36 am, Alex Baranosky > wrote: >> For what it's worth, I think colon's as whitespace

Re: Could be my favourite improvement in 1.4

2011-12-20 Thread jweiss
Even if they did, it's pretty easy to surround the paste with (read- json "... "). On Dec 20, 10:36 am, Alex Baranosky wrote: > For what it's worth, I think colon's as whitespace in maps adds confusion, > without, imo adding a ton of power or readability.  In terms of power, it > gives you the ab

Re: Could be my favourite improvement in 1.4

2011-12-20 Thread Alex Baranosky
For what it's worth, I think colon's as whitespace in maps adds confusion, without, imo adding a ton of power or readability. In terms of power, it gives you the ability to paste JSON into a Clojure REPL; I wonder how often that use case comes up? In terms of readability, any benefit it gives you

Re: Could be my favourite improvement in 1.4

2011-12-20 Thread Cedric Greevey
On Tue, Dec 20, 2011 at 2:05 AM, Alan Malloy wrote: > On Dec 19, 9:25 pm, Phil Hagelberg wrote: >> JSON as readable Clojure was discussed and shot down a while back, albeit >> with a weirder >> implementation:http://groups.google.com/group/clojure-dev/browse_thread/thread/5b066... >> idea of col

Re: Could be my favourite improvement in 1.4

2011-12-19 Thread Alan Malloy
On Dec 19, 9:25 pm, Phil Hagelberg wrote: > JSON as readable Clojure was discussed and shot down a while back, albeit > with a weirder > implementation:http://groups.google.com/group/clojure-dev/browse_thread/thread/5b066... > idea of colons having special treatment in the context of maps is > ra

Re: Could be my favourite improvement in 1.4

2011-12-19 Thread Phil Hagelberg
JSON as readable Clojure was discussed and shot down a while back, albeit with a weirder implementation: http://groups.google.com/group/clojure-dev/browse_thread/thread/5b066af1224efe8e/9ae78e878f873058The idea of colons having special treatment in the context of maps is rather distasteful to me pe