Re: [ANN] Clojure 1.9.0-alpha4

2016-06-04 Thread Martin Raison
I support this change. Not only is it closer to the GIGO philosophy, but "let x in S" is actually a very reasonable use-case. Sometimes I just want an element from a set and I don't care about which particular one. Your code may break if you're using try/catch to handle sets in a special way,

Re: [ANN] Clojure 1.9.0-alpha4

2016-06-04 Thread Atamert Ölçgen
Hi Alex, On Sat, Jun 4, 2016 at 3:22 PM, Alex Miller wrote: > Why? > Because unordered collections shouldn't have heads defined. Is (first #{3 1 2}) => 3? or 2? or 1? (I just tried it in a REPL and it is apparently 1.) > > -- > You received this message because you

Re: [ANN] Clojure 1.9.0-alpha4

2016-06-04 Thread Nicola Mometto
How is this a regression? It doesn't cause any code that used to work to stop working. The fact that tail destructuring now causes non-sequential collections to be destructured by sequential destructuring should be just considered an instance of GIGO and an implementation detail. > On 4 Jun

Re: [ANN] Clojure 1.9.0-alpha4

2016-06-04 Thread 'Alan Forrester' via Clojure
What are you asking “Why?” about? You haven’t quoted anything so it’s not clear what you’re asking about. Alan On 4 Jun 2016, at 13:22, Alex Miller wrote: > Why? > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To

Re: [ANN] Clojure 1.9.0-alpha4

2016-06-04 Thread Alex Miller
Why? -- 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 email to

Re: [ANN] Clojure 1.9.0-alpha4

2016-06-04 Thread Atamert Ölçgen
On Sat, Jun 4, 2016 at 9:28 AM, <676c7...@gmail.com> wrote: > This isn’t only an optimisation but also a change in behaviour, isn’t > it? > > Clojure 1.9.0-alpha3: > > user=> (let [[x & xs] #{1 2 3}] x) > UnsupportedOperationException nth not supported on this type: > PersistentHashSet

Re: [ANN] Clojure 1.9.0-alpha4

2016-06-04 Thread 676c7473
This isn’t only an optimisation but also a change in behaviour, isn’t it? Clojure 1.9.0-alpha3: user=> (let [[x & xs] #{1 2 3}] x) UnsupportedOperationException nth not supported on this type: PersistentHashSet clojure.lang.RT.nthFrom (RT.java:948) Clojure 1.9.0-alpha4: user=> (let [[x & xs]

Re: [ANN] Clojure 1.9.0-alpha4

2016-06-02 Thread Ghadi Shayban
Let bindings from thbe macroexpansion of (let [[x & xs] v] ...) ;; old macroexpand [G__1 v vec__2 G__1 x (nth vec__2 0 nil) xs (nthnext vec__2 1)] ;; new macroexpand [G__6 v vec__7 G__6 seq__8(seq vec__7) first__9 (first seq__8) seq__8(next

Re: [ANN] Clojure 1.9.0-alpha4

2016-06-01 Thread Frank Castellucci
How was this accomplished? On Wednesday, June 1, 2016 at 10:17:14 AM UTC-4, Rich Hickey wrote: > > To give people an idea of the update-in and seq destructuring > improvements: > > (let [d3 {:a {:b {:c 2}}}] > (dotimes [_ 10] > (time (dotimes [_ 1000] > (update-in d3

Re: [ANN] Clojure 1.9.0-alpha4

2016-06-01 Thread Isaac Zeng
That really cool On Wednesday, June 1, 2016 at 10:17:14 PM UTC+8, Rich Hickey wrote: > > To give people an idea of the update-in and seq destructuring > improvements: > > (let [d3 {:a {:b {:c 2}}}] > (dotimes [_ 10] > (time (dotimes [_ 1000] > (update-in d3 [:a :b :c]

Re: [ANN] Clojure 1.9.0-alpha4

2016-06-01 Thread Rich Hickey
To give people an idea of the update-in and seq destructuring improvements: (let [d3 {:a {:b {:c 2}}}] (dotimes [_ 10] (time (dotimes [_ 1000] (update-in d3 [:a :b :c] inc) ;;; 1.9 alpha3 ;; user=> "Elapsed time: 6489.189065 msecs" "Elapsed time:

[ANN] Clojure 1.9.0-alpha4

2016-05-31 Thread Stuart Halloway
Clojure 1.9.0-alpha4 is now available. Try it via - Download: https://repo1.maven.org/maven3/org/clojure/clojure/1.9.0-alpha4 - Leiningen: [org.clojure/clojure "1.9.0-alpha4"] 1.9.0-alpha4 includes the following changes since 1.9.0-alpha3: - fix describe empty cat - improve update-in perf -