From: Jean-Hugues ROBERT Date: 2004-05-01T15:27:56+09:00 Subject: Re: def [](v) xx; return yy; end # returned value is ignored !? At 07:24 01/05/2004 +0900, you wrote: >Hi -- > >Jean-Hugues ROBERT writes: > > > Coherence is a nice thing. > > > > However, it this case it makes it *IMPOSSIBLE* to implement "by ref" versus > > "by value" semantic in Ruby (this is probably *one* of the reasons, not the > > only one). I hate to state that something is impossible in Ruby. > Additionnaly > > "Impossible is not French" quoting Napoleon. Let's say it is > "difficult" and > > let's hope it not an euphemism. > >There's nothing wrong with something being impossible in Ruby. Ruby >is flexible and dynamic, but it's still a particular programming >language, designed a certain way with certain perfectly acceptable >consequences. There's no shame in Ruby's failing to supply everything >needed for every possible paradigm or programming technique or style. Nothing wrong, I for sure agree. And "by ref" is probably not something very common (yet it is useful). OTOH, I'll keep investigating what is missing to implement it. If only a few things are missing (I suspect this is the case), I'll provide a prototype implementation in an RCR. It may then prove worthwhile to introduce the missing parts, assuming they have no or very acceptable drawbacks. At this point I believe that the key missing mechanism is some kind of a Lvalue Class. More on this when I am done. The reason I "hate" stating that something is impossible in Ruby is mainly fear that people may take it as a critic, where I would want it to be taken as a challenge. I guess "hate" was a bad verb, sorry about that. Yours, Jean-Hugues >David > >-- >David A. Black >dblack@wobblini.net ------------------------------------------------------------------------- Web: http://hdl.handle.net/1030.37/1.1 Phone: +33 (0) 4 92 27 74 17