Some of these are pretty amazing, like the `digits` method and the new OptionParser functionality (which seems to be a sort of standard library equivalent to doctopt!).<p>That being said, I can't help but shake my head at the section about "multiple assignment of conditionals:<p>"You can now assign multiple variables within a conditional...You probably shouldn’t do that though."<p>Am I alone and thinking that it's a little bit hypocritical to specifically add functionality to your language if you don't want people to use it? Or is this just a joke that's gone over my head?
Ruby is the first language I really like. The core concept of the language is small, just not easy to get, but the change on how to programming is significant.
Sadly, Ruby is not the language for the multi-core world, and many advantages of using it is disappearing.
Although Ruby is changing, 2.3, 2.4, maybe 3.0, but what's the difference?
> <i>If you are calling #sum on an array of non-integers then you need to provide your own initial value</i><p>Why? This doesn't seem necessary, but, more importantly, would be inconsistent with #inject's behaviour (if enforced).<p>----<p><a href="http://ruby-doc.org/core-2.3.1/Enumerable.html#method-i-inject" rel="nofollow">http://ruby-doc.org/core-2.3.1/Enumerable.html#method-i-inje...</a>:<p><i>If you do not explicitly specify an initial value for memo, then the first element of collection is used as the initial value of memo</i>
Great to see my favorite language evolving! I also use various lisps, Java, Haskell, Typescript, JavaScript, Python, etc., but I am happiest when coding in Ruby.<p>Unfortunately, most of what I do now is machine learning, and Python wrappers for underlying C++ code have by far more support than Ruby. (Ruby does have some great ML projects and libraries though).
Ruby 2.4 adds a new #match? method for regular expressions which is three times faster than any Regexp method in Ruby 2.3:<p>Why does Ruby have 4 different regexp match functions?<p>Regexp#match?: 2630002.5 i/s
Regexp#===: 872217.5 i/s - 3.02x slower
Regexp#=~: 859713.0 i/s - 3.06x slower
Regexp#match: 539361.3 i/s - 4.88x slower
Why do the old match operators now implicitly set a global variable? I feel like in a year I'm going to be debugging some really weird race conditions because of that change and I can't see any value in it...if I want to use the value of a match operator I'll _always_ save it to a local variable.<p>Can anyone shed any light on this, because my first attempts at grok'ing this change have me really blown away.
These are all great but when are we getting optional typing? If the js ecosystem wasn't a clown operation my language of choice would be typescript instead of ruby.