Ruby 2.3.0 Released (ruby-lang.org) 45
An anonymous reader writes: Ruby developers have announced the official release of Ruby 2.3.0. This release introduces a frozen string literal pragma, which is "a new magic comment and command line option to freeze all string literals in the source files." It also adds a safe navigation operator &. similar to what exists in C#, Groovy, and Swift. Ruby 2.3.0 also has many performance improvements. For more details, see the news file and the full changelog.
Re: Real rockstars use Erlang aka OTP (Score:3)
Outlaw Psycho Bitch is the shit man! [youtube.com] You will have women watch you code at alternative coffee shops and groupies guaranteed!!
Re:A frozen string literal pragma (Score:4, Informative)
If some twit has code like "hello"[5]=0 and you wonder why all your code is going to hell, maybe this will prevent it.
Re: (Score:3)
Frozen strings are extremely useful when doing multi-threaded code. I take this as a sign that Ruby is getting ready for actual use of multi-core execution. (Ruby has an equivalent to Python's GIL which currently prevents multiple simultaneous execution in the same interpeter/virtual machine.)
Re: (Score:2)
I understand. Also, I believe, Rubinius. But that's not the Ruby we're talking about. We're talking about the one that just released a new version.
Frozen strings are not required for multi-core execution, but they facilitate it.
Mangled title bar (Score:1)
Anybody else seeing a weird mangled title bar on this submission?
Re: (Score:1)
Confirmed - there appears to be an unnecessary line break or line wrapping going on.
Oh great! (Score:2)
similar to what exists in C#, Groovy, and Swift
So now it's more like the other languages that I don't like! ;)
Ruby: consolidate your hate!
Re: Oh great! (Score:2)
Yeah why can't it be cool and hip like Erlang! [youtube.com]
1st there was perl (Score:1)
And it was awesome at the time. I still have a pile of one liners. But time matched on.
Along came ruby. Chef, puppet, and cli but then came Rails to confuse most people into thinking ruby == rails. F*ck!
Syntactically, ruby is the best language ever. It sucks to see it de-meaned.
Its influence on c++/Python specially, where I spent years messing with template types, wishing for closures/Procs, is greatly appreciated. Now we have auto,decl,closures. So I take a deep bow to a Ruby.
Wow, golang but wait c++ can
Re: (Score:3)
You may be confused because Ruby has a plethora of alternate ways to do things. But they are not required and the underlying syntax is extremely consistent.
The most inconsistent part of it was added to the language relatively recently. That is the "alternate" hash syntax. The standard syntax for a hash with symbols as keys is
{:key1 => value1, :key2 => value2}
and so on. But the alternate syntax is
{key1: value1, key2: value2}
much like JSON. I seldom use this alternate syntax precisely because whi
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
It's too bad Rails gave it such a bad wrap
Rails is terrible, but the Rails -community- is what is making me keep my distance from Ruby. I've worked at countless companies, in pretty much all mainstream programming languages and got involved in a lot of communities, but none made me step back so much as the Rails community. Freagin viruses taking every best practices and flipping them upside down then looking at you like you're an idiot for challenging them.
Then when that falls apart they spread to other communities and try to push their Rails bulls
Haters gonna hate (Score:2)
Haters gonna hate.
I work with Ruby everyday, and it feels fun everyday.
Thanks for the hard work!