His comments starting at the 54 minute mark really hit home. "I want work to be visibly done in code." He talks about looking at a the C++ standard library implementation of a red/black tree and seeing that the "is red" flag was stored in the last bit of a pointer (to a node apparently) in order to save space. But when he, then, spent 15 minutes trying to figure out where the flag was being set, he couldn't. "You don't know where work is being done. Crack open boost. Crack open GCC. You don't know where work is being done"
The funny and at the same time sad thing about this talk is that a lot of people care about Rust because of as Andrei said "great marketing" and so few (in comparison with Rust) people care about D.
rust lost me when the first, literally the absolute first, rust statement that is shown in the introduction ( doc.rust-lang.org/book/ch01-02-hello-world.html ) is a _fucking macro_ . Seriously, who thought it was a good idea?
Thanks for the great talk. Now let's get me fired from my job. Calculates the average of a sequence of numbers in a lisp without getting the size twice: ``` (defn avg [numbers] (if (empty? numbers) 0 (apply / (reduce (fn [[sum cnt] num] [(+' sum num) (inc' cnt)]) '(0.0, 0) numbers)))) ``` The +' and inc' functions do automatic conversion into bigger types (BigDecimal and BigInteger in this case) as necessary. The whole monster still only works on numeric types that Clojure supports. It's probably the same as the Haskell code you showed, but I can't read that.
Although I have great respect for Mr. Alexandrescu I found the talk very difficult to follow and to understand the points that he was trying to make. There are a lot of small minutia which can be had even in such a small and simple function as a function to compute average and I expected some sort of comprehensive (or concise) overview of how each language does it according to parameters set by Mr. Alexandrescu ... however this did not happen (at least as far as I can see). I think that some more preparation should have gone into the talk. As it is, I find that it is mostly oriented towards being (slightly) provocative and (somewhat) funny but too confusing to enjoy.
Alexandrescu is turning into a Stepanov... ranting old man... Algorithm he criticizes can sum 1000 of INT_MAX/5 values without overflow, his simple for loop can not.
His comments starting at the 54 minute mark really hit home. "I want work to be visibly done in code." He talks about looking at a the C++ standard library implementation of a red/black tree and seeing that the "is red" flag was stored in the last bit of a pointer (to a node apparently) in order to save space. But when he, then, spent 15 minutes trying to figure out where the flag was being set, he couldn't. "You don't know where work is being done. Crack open boost. Crack open GCC. You don't know where work is being done"
The funny and at the same time sad thing about this talk is that a lot of people care about Rust because of as Andrei said "great marketing" and so few (in comparison with Rust) people care about D.
Rust and D are quite different, though, and there are many reasons to care about one or the other but not both.
I would suggest that people care about Rust because it works and it's memory management is superior to anything else out there.
@@user-ov5nd1fb7s, that is highly opinionated.
@@VioletGiraffe ok, let's say that it's up there with the best. The point is that it's not "all marketing".
rust lost me when the first, literally the absolute first, rust statement that is shown in the introduction ( doc.rust-lang.org/book/ch01-02-hello-world.html ) is a _fucking macro_ . Seriously, who thought it was a good idea?
Thank you, Andrei.
Thanks for the great talk. Now let's get me fired from my job.
Calculates the average of a sequence of numbers in a lisp without getting the size twice:
```
(defn avg
[numbers]
(if (empty? numbers)
0
(apply /
(reduce
(fn [[sum cnt] num]
[(+' sum num) (inc' cnt)])
'(0.0, 0)
numbers))))
```
The +' and inc' functions do automatic conversion into bigger types (BigDecimal and BigInteger in this case) as necessary. The whole monster still only works on numeric types that Clojure supports.
It's probably the same as the Haskell code you showed, but I can't read that.
@FichDich InDemArsch Cooler Name. Sehr erwachsen. :D
This is a really great talk.
Great talk! D rox!
No average of complex numbers?
Although I have great respect for Mr. Alexandrescu I found the talk very difficult to follow and to understand the points that he was trying to make. There are a lot of small minutia which can be had even in such a small and simple function as a function to compute average and I expected some sort of comprehensive (or concise) overview of how each language does it according to parameters set by Mr. Alexandrescu ... however this did not happen (at least as far as I can see).
I think that some more preparation should have gone into the talk. As it is, I find that it is mostly oriented towards being (slightly) provocative and (somewhat) funny but too confusing to enjoy.
Alexandrescu is turning into a Stepanov... ranting old man... Algorithm he criticizes can sum 1000 of INT_MAX/5 values without overflow, his simple for loop can not.