K
kunjaan
What do you mean when you say"Class definitions are executable code".
How do classes differ from other OO languages?
How do classes differ from other OO languages?
kunjaan said:What do you mean when you say"Class definitions are executable code".
How do classes differ from other OO languages?
kunjaan said:What do you mean when you say"Class definitions are executable code".
How do classes differ from other OO languages?
Because the class is only created when the class definition code is
actually run. For example, the following code is syntactically fine:
What do you mean when you say"Class definitions are executable code".
kunjaan said:What do you mean when you say"Class definitions are executable code".
How do classes differ from other OO languages?
I like to say it like this:
Ruby doesn't have class declarations. "Declaring" a class is actually just
constructing a new Class object and running code against it. All classes
start out blank and must have methods and instance variables added to them
at runtime.
Charles said:I like to say it like this:
Ruby doesn't have class declarations. "Declaring" a class is actually
just constructing a new Class object and running code against it. All
classes start out blank and must have methods and instance variables
added to them at runtime.
Rick said:I don't know what JRuby does.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.