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,
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
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
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
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
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
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]
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
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
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]
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:
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
-
12 matches
Mail list logo