method search rule in 2.0?

T

Trans

Silly me. I never read the orignal material. I just went back and did
so and now see that the local concept I brought up is really exactly
the kind of solution the author is looking for --at least according to
the stated problem.

The idea of directed method calls (i.e. C#x) is really a separate idea
--albeit related.

Interesting...
T.
 
M

Mathieu Bouchard

---1077017559-2089278202-1113753095=:18757
Content-Type: MULTIPART/MIXED; BOUNDARY="-1077017559-2089278202-1113753095=:18757"

This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.

---1077017559-2089278202-1113753095=:18757
Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-1; format=flowed
Content-Transfer-Encoding: QUOTED-PRINTABLE
Content-ID: <[email protected]>


http://pub.cozmixng.org/~the-rwiki/rw-cgi.rb?cmd=3Dview;name=3DRuby2.0Met= hodSearchRuleEnglish
CC.new.process # C#process expects C#util,
# but calls CC#util
Why is this a problem? Isn't it what people expect in OO? I'm not an OO= =20
expert, but isn't this one of the supposedly unique feature/benefit of OO= :=20
allowing old code to call new code. I believe it's called polymorphism?
Now Ruby2 wants to change so that 'util' in C method calls C#util and=20
'self.util' calls CC#util. I very much prefer 'self.util' to be the one t= hat=20
calls C#util (and I don't think I'll ever use it a lot). The latter is=20
backwards compatible and how virtually all other languages behave.

I want neither util() nor self.util() to call C's util directly, and if=20
either change passes, then I *will* reconsider my five-year relationship=20
with Ruby. I can't even begin to imagine the amount of code that this=20
change would break anyway, so I can't imagine Matz making that change=20
either.

,-o---------o---------o---------o-. ,----. |
| The Diagram is the Program (TM) | | ,-o----------------------------o-.
`-o-----------------------------o-' | | Mathieu Bouchard (Montr=E9al QC)=
|
| |---' | http://artengine.ca/matju |
| | `-o------------------------------'
---1077017559-2089278202-1113753095=:18757--
---1077017559-2089278202-1113753095=:18757--
 

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

Members online

Forum statistics

Threads
473,801
Messages
2,569,658
Members
45,421
Latest member
DoreenCorn

Latest Threads

Top