Comment on this RCR (edit wiki page) | RCRchive home

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

Strongly opposed [0]
Opposed [0]
Neutral [0]
In favor [1]
Strongly advocate [4]

Change the status of this RCR to:

accepted

rejected

withdrawn


Add comments here

sorry for wrong escaping in post (dmiceman, 2003-11-28 00:28:07)

code should look like:

str=<<END
  class aaa<br />
  end<br />
END
klass = eval str
klass.new

doen's it work now? (, 2003-11-28 04:25:24)

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?

scoop (transami, 2003-11-29 06:30:08)

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