RCR 171: All language constructs to return something useful
submitted by dmiceman on 2003-11-28 00:25:11
This is a legacy RCR. If this is your RCR, please resubmit it using the new format and process.
For language consistency, i think all constructions like class, module, def, etc should return some useful values. For class it can be class object, mor module -- module. So constructions like:
str =
will be possible.
Vote for this RCR
Add comments here
code should look like:
str=<<END
class aaa<br />
end<br />
END
klass = eval str
klass.new
class Klass end
returns Klass at the moment. for end, returns niln do..end returns.. wel, return, and def..end returns nil. BTW def..end should at least return a symbol of the method.. someone with an rcr please?
It's already been noted and should be taken care of in future. I don't know why they don't do ASAP. Its an easy fix w/ no back code breaking as far as I know. Perhaps they still debate symbol or method.
I agree, that as many constructs as possible return useful results. Just no good reason not to.
Back to RCRchive.
RCR Submission page and RCRchive powered by Ruby, Apache, RuWiki (modified), and RubLog
str=<<END
END
klass = eval str
klass.new