As far as I understand it the current spec is to have "using" be available only to main and only apply in the file scope. IMHO this makes the feature nearly useless.
If you explore the topic, there are solid reasons from performance, to vm ports, to readability for why refinements have been curtailed. I'm quite happy with this. The original refinement support would have held ruby back, even if it had its uses.
It's amazing that considering Ruby's philosphy we didn't have named arguments until now. I think this was a case where the idiom of using hashes as named arguments working well enough that the core team didn't feel the need to address it earlier, still proper keyword arguments are going to be great.
I thought Matz was going to drop refinements for 2.0 for now?
Keyword arguments are not that important. They're a very nice feature but most of the benefits it will bring could be emulated easily using hashes (not telling you anything you didn't already know I guess).
It's nice to see that we won't have to rely on smart hacks though and that real keyword arguments are now available, but it's nowhere near earth-shattering.
As for refinements, it's theoretically a very nice feature, but it seems that the details are still hazy and the green-ness of the feature raises more eyebrows than it solves problems.
"DTrace can be used to get a global overview of a running system, such as the amount of memory, CPU time, filesystem and network resources used by the active processes. It can also provide much more fine-grained information, such as a log of the arguments with which a specific function is being called, or a list of the processes accessing a specific file."
For anyone else that wasn't aware what Dtrace does.
OT: does anyone else notice that the Japanese text doesn't render correctly (in Chrome and Firefox on Linux & Windows) unless they manually change the encoding to EUC-JP? Why doesn't it work with Unicode, for the Ruby ML, of all things?
The server does not send the charset in the response headers, and the document that is generated does not contain a charset like this:
<meta charset="utf-8">
Either of those two options should fix the page, but I assume Japanese browsers have different default charset than ours since no one has fixed it yet.
Does anyone know what ever happened with Kiji, it seems a generational GC for Ruby has already been coded twice, yet in 2.0 it seems the only big change is the CoW friendly GC
I don't know the specific characteristics of Kiji, but I know that it is not a real generational GC. A generational GC that doesn't break every C extension is impossible because Ruby passes around direct pointers, so Ruby objects can't be moved in memory.
That being said, I'm not a language or VM guy, so take what I say with a grain of salt.
[+] [-] subwindow|13 years ago|reply
As far as I understand it the current spec is to have "using" be available only to main and only apply in the file scope. IMHO this makes the feature nearly useless.
[+] [-] aneth4|13 years ago|reply
[+] [-] danielpal|13 years ago|reply
The thing I like the most about ruby is how much thought is put into code readability and programming experience.
My favorite features of this release:
1. Keyword arguments: I can stress how important this is for code readability and also prevents some bugs.
2. Refinements: This is going to make code easier to maintain and more "custom". I can't wait to add a few things we constantly use on String etc.
[+] [-] tomstuart|13 years ago|reply
[+] [-] theshadow|13 years ago|reply
I thought Matz was going to drop refinements for 2.0 for now?
[+] [-] VeejayRampay|13 years ago|reply
It's nice to see that we won't have to rely on smart hacks though and that real keyword arguments are now available, but it's nowhere near earth-shattering.
As for refinements, it's theoretically a very nice feature, but it seems that the details are still hazy and the green-ness of the feature raises more eyebrows than it solves problems.
[+] [-] delano|13 years ago|reply
[+] [-] MikeKusold|13 years ago|reply
For anyone else that wasn't aware what Dtrace does.
Wikipedia Link: http://en.wikipedia.org/wiki/DTrace
[+] [-] VeejayRampay|13 years ago|reply
Put in the right hands, this will prove to be a deadly weapon.
[+] [-] w1ntermute|13 years ago|reply
[+] [-] cmwelsh|13 years ago|reply
[+] [-] unknown|13 years ago|reply
[deleted]
[+] [-] mitchty|13 years ago|reply
num2int.c:82:21: error: expected ')'
[+] [-] ajasmin|13 years ago|reply
[+] [-] sams99|13 years ago|reply
[+] [-] mitchellh|13 years ago|reply
That being said, I'm not a language or VM guy, so take what I say with a grain of salt.
[+] [-] lhnn|13 years ago|reply