From: "David A. Black" Date: 2008-08-30T05:16:20+09:00 Subject: Re: Immutable Ruby --1926193751-226556473-1220041273=:25552 Content-Type: MULTIPART/MIXED; BOUNDARY="1926193751-226556473-1220041273=:25552" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1926193751-226556473-1220041273=:25552 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Hi -- On Sat, 30 Aug 2008, Trans wrote: > > > On Aug 29, 12:18=A0am, Yukihiro Matsumoto wrote: >> Hi, >> >> In message "Re: Immutable Ruby" >> =A0 =A0 on Fri, 29 Aug 2008 10:19:15 +0900, Trans = writes: >> >> |I was thinking about Erlang a bit today, the fact that it's objects >> |are all immutable and it's usefulness to concurrency. So I began to >> |wonder, what would an Immutable Ruby look like? >> >> I have once dreamed of a such language, and had a conclusion that was >> not Ruby at least, although a pretty interesting language. > > Does that mean you think Immutable Ruby would be so different a > language as to no longer be recognizable as Ruby? Perhaps so. The > prospect is very interesting to me nonetheless. If I did not have to > worry so much about $$$$, I would very much like to try my hand at > writing an Immutable Ruby in Erlang. I don't think it would be recognizable as Ruby. Consider this: $ ./ruby -ve 'a =3D Object.new; class << a; def talk; print "hi\n"; end; end; a.talk' ruby - version 1.0-971225 (i686-linux) hi If you change print to puts, it won't know what you mean. And don't ask a for its .methods either. In other words, per-object differential behavior was part of Ruby before puts and methods were. I'd say it's pretty fundamental :-) (If anyone wants my hacked copy of Ruby 1.0 (hacked to compile on gcc 4.0, for some definitions of "compile"), let me know.) David --=20 Rails training from David A. Black and Ruby Power and Light: Intro to Ruby on Rails January 12-15 Fort Lauderdale, FL Advancing with Rails January 19-22 Fort Lauderdale, FL * * Co-taught with Patrick Ewing! See http://www.rubypal.com for details and updates! --1926193751-226556473-1220041273=:25552-- --1926193751-226556473-1220041273=:25552--