Modules and methods

  • Thread starter Javier Valencia
  • Start date
B

Brian Schröder

I mean that you can't use that method anywere at anytime, only within
the module or class.
This is the c++ way

You have included the module, so you are inside of the module and may use it.

Regards,

Brian
 
J

Javier Valencia

ts said:
J> This is the c++ way

this is what I wanted to hear : perhaps now it's time to you to learn the
ruby way :)))


Guy Decoux
hehehe you caught me :'(
but i find it more "logical" in the c++ way

I'll have to manage the ruby way in the end!
 
J

Javier Valencia

Brian said:
You have included the module, so you are inside of the module and may use it.

Regards,

Brian
yeah, i understand now, but without including it, works too. I have to
use the class << "thing"
 
R

Robert Klemme

Javier Valencia said:
hehehe you caught me :'(
but i find it more "logical" in the c++ way

We can certainly debate that. I for my part have found it always
irritating that in C++ and Java you can access private members of another
instance of the same class. This is convenient in some cases and
arguments can be put forward to support this. However, you can argue with
some justification that it breaks encapsulation which is one of the big
nono's of OO. My 0.02 EUR...
I'll have to manage the ruby way in the end!

:)

Kind regards

robert
 
Y

Yukihiro Matsumoto

Hi,

In message "Re: Modules and methods"

|There should be an api change to allow a more "user friendly" way to do
|things?

We need to define "user friendly" before entering serious discussion.
But I recommend you to learn the language first. In general, trying
to change your learning language is not a good idea.

matz.
 

Ask a Question

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.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
474,169
Messages
2,570,919
Members
47,458
Latest member
Chris#

Latest Threads

Top