<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Talk Like A Duck: Tag language_wars</title>
    <link>http://talklikeaduck.denhaven2.com/articles/tag/language_wars</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>In Ruby, it's not the dog, it's the tricks!</description>
    <item>
      <title>Where I Come From</title>
      <description>&lt;p&gt;Maybe I&amp;#8217;ve gotten a bit sensitive of late to the perception some Rubyists
seem to have of Smalltalk-bred Rubyists like me. So I thought that I might say a bit more of what
I think of the current and future of Ruby as a language.
What follows is much longer than what I expected it to be when I started writing it yesterday,
I hope that some will find it some combination of interesting, useful, thought-provoking, or
at least amusing.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This weeks meeting of the &lt;a href="http://ruby.meetup.com/3/"&gt;raleigh.rb&lt;/a&gt;
group was a recap of railsconf 2007. Some of the attendees seemed to have gotten 
a feeling that Avi Bryant was attacking Ruby in his keynote.  I can&amp;#8217;t speak for
him, and I wasn&amp;#8217;t there so this might just be my reaction.&lt;/li&gt;
&lt;li&gt;Heard this week on ruby-talk in a discussion of the fact that Module#ancestors doesn&amp;#8217;t
include a singleton class of the receiver should it have one:
&lt;blockquote&gt;
I do not want to argue with the wise guys if it is an error &amp;#8211; I
clearly thought so but that is not important ;)
&lt;br/&gt;&lt;br/&gt;But it really would have saved me an hour of debugging if the doc
stated clearly that singletons are not included. I thought this might
help others and as it took me 20s to vim the missing line into class.c
&lt;br/&gt;&lt;br/&gt;
- Robert Dober
&lt;/blockquote&gt;
To which I replied:
&lt;blockquote&gt;
As far as I can tell, singleton classes aren&amp;#8217;t mentioned in the doc.
The documentation borders on folklore.
&lt;br/&gt;&lt;br/&gt;
Singletons as a means of implementing both individual instance, and
class behavior have a position like &amp;#8220;the man behind the curtain&amp;#8221; in
&amp;#8220;The Wizard of OZ.&amp;#8221;  We&amp;#8217;re really supposed to disregard them. &lt;G&gt;
&lt;br/&gt;&lt;br/&gt;
Coming from a background in Smalltalk, my preference would be if this
machinery were more visible and official, but Matz has his reasons for
not doing so.  For one thing, not documenting it, and hiding it from
methods like ancestors and class makes it easier to tinker with as the
language evolves without &amp;#8220;officially&amp;#8221; breaking backward compatibility.
&lt;/blockquote&gt;
&lt;p&gt;Which prompted:
&lt;blockquote&gt;
Does that mean that no one who&amp;#8217;s ever used Smalltalk can ever think
that it&amp;#8217;s right for Ruby to deviate from Smalltalk? :-)  I ask in a
humorous spirit&amp;#8212;and also because it gives me an excuse to mention:
&lt;br/&gt;&lt;br/&gt;
&lt;a href="http://www.infoq.com/articles/coming-from-ruby"&gt;http://www.infoq.com/articles/coming-from-ruby&lt;/a&gt;
&lt;br/&gt;&lt;br/&gt;
&amp;#8212;David A. Black
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To answer David&amp;#8217;s humorously posed question, &lt;strong&gt;No&lt;/strong&gt;, 
and I present myself as &amp;#8220;exhibit A,&amp;#8221; because I certainly think that it&amp;#8217;s right
for Ruby to deviate from Smalltalk.  My main motivations in writing about Ruby in the context
of my Smalltalk background are first to help myself, and I hope others, understand Ruby a little
better by providing some perspective from another, earlier, dynamic language, and second, to a much
lesser extent, to air ideas of how some of the features of Smalltalk might be incorporated or
adapted as useful additions to Ruby as it evolves.
&lt;/p&gt;
&lt;p&gt;In many ways, I like Ruby better than I like Smalltalk.  To name a few reasons, Ruby is more dynamic, has a more flexible deployment &amp;#8216;model,&amp;#8217;, and 
albeit it&amp;#8217;s not a technical reason, it&amp;#8217;s not carrying the burden of the old business model of 
trying to get thousands of bucks for each development seat.&lt;p&gt;  
&lt;p&gt;This 
is what really allowed
Java to pop Smalltalk&amp;#8217;s balloon.  Smalltalk was seen by &lt;span class="caps"&gt;IBM&lt;/span&gt; and it&amp;#8217;s competitors as &amp;#8220;enterprise&amp;#8221; 
technology, and they expected the same kind of prices which
other corporate level software development
tools commanded.  When Java came out and was free &amp;#8220;as in beer,&amp;#8221; it gained a large popularity with
language hobbyists/hackers who could easily get it to play with, and a lot of those guys worked
for the companies to which &lt;span class="caps"&gt;IBM&lt;/span&gt;, ParcPlace-Digitalk, and the others were catering.&lt;/p&gt;
&lt;p&gt;The other aspect of Java which helped at the time was it&amp;#8217;s relationship in 
syntax, and a lot of its semantics, to C++ at a time when there was a lot of corporate C++
activity and some frustration was starting to be felt with the complexity of C++.  Java
felt enough like a simplified and friendlier C++ being a language which was more dynamic
without &amp;#8220;going all the way&amp;#8221; and which
felt familiar to both C++ advocates and C++ approach to
strongly typed class hierarchies, and C++ programmers with symptoms of the
&lt;a href="http://en.wikipedia.org/wiki/Stockholm_syndrome"&gt;Stockholm syndrome.&lt;/a&gt;
These self-same aspects of Java caused many Smalltalkers to be uneasy with
the language.&lt;/p&gt;
&lt;p&gt;The real salvation of Smalltalk, as it exists today, was and is Squeak.  I remember when I
first encountered Squeak, it was at a Birds-of-a-feather session at &lt;span class="caps"&gt;OOPSLA&lt;/span&gt;, right when Java was
really starting to get most of the mind-share.  My impression was that the atmosphere in the room
must have been somewhat like that in the Roman catacombs when the early Christians were 
hiding out.&lt;/p&gt;
&lt;p&gt;I guess that there is still a bit of the old &amp;#8220;Enterprise&amp;#8221; Smalltalk market, 
Instantiations, which took
over the old &lt;span class="caps"&gt;IBM&lt;/span&gt;/VisualAge Smalltalk base when it fell out of IBMs strategies, 
&lt;a href="http://www.instantiations.com/VAST/purchase.html"&gt;
sells it for an entry price of 
$6,995.&lt;/a&gt; There must be enough of the old legacy corporate Smalltalk customers around who 
buy it.&lt;/p&gt;
&lt;p&gt;Personally, it&amp;#8217;s been quite a while since I was an active Smalltalker, I made an oddyssey
through Java-land with IBMs shift in priorities.  I plan to write about some of my 
feelings during that period in retrospection but that&amp;#8217;s for a later date.&lt;/p&gt;
&lt;p&gt;I haven&amp;#8217;t been
keeping up with Squeak enough to know how and how much it has evolved the Smalltalk technology
and community.&lt;/p&gt;
&lt;h2&gt;Old Smalltalker&amp;#8217;s perceptions of Ruby&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;I always thought that Smalltalk would beat Java, I just didn&amp;#8217;t know that it would be called
&amp;#8216;Ruby&amp;#8217; when it did.&lt;/p&gt;
&lt;p&gt;&amp;#8212;Kent Beck&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I ran across this quote for the first time a few weeks ago.  It &lt;strong&gt;sounded&lt;/strong&gt; like
something that Kent would say, and also something that I would like to quote myself, but just
to make sure, I asked him.  He told me that &amp;#8216;yes&amp;#8217; he had said it in a private communication to
someone else, and both he and the original recipient had only recently found out that it was
becoming an internet meme.  Googling &lt;a href=""I always thought smalltalk would beat java"&gt;
&amp;#8220;I always thought that Smalltalk would beat Java&amp;#8221;&lt;/a&gt; garners over 250 hits.&lt;/p&gt;
&lt;p&gt;Kent tells me that he&amp;#8217;s a Ruby fan. Ward Cunningham is also. 
&lt;p&gt;I asked Ward, just before RailsConf,
if he was going since it was in his home-town.
He said that he had found out about it after
registration was closed, but he was planning to hang out at the hotel anyway.  From what I heard
last night he was recognized and invited to attend.&lt;p/&gt;
&lt;p&gt;Several of my other old Smalltalk buddies, who had also gone through a period with Java,
seem to have the same feeling which I do, that
looking at and using Ruby feels like being a widower who meets a new woman, who just seems to 
be a partial reincarnation of the former spouse.&lt;/p&gt;
&lt;h2&gt;Where You Are Come From Depends On Where You Came From&lt;/h2&gt;
&lt;p&gt;Getting to David Black&amp;#8217;s article.  He certainly has a point about letting Ruby be Ruby.  As
I&amp;#8217;ve said, I&amp;#8217;m quite happy with Ruby.&lt;/p&gt;
&lt;p&gt;Getting back to the early perceptions of Java, and making an analogy with natural languages
let me suggest that if we think of Smalltalk as Italian, and C++ as German, Java is
&lt;a href="http://en.wikipedia.org/wiki/Alsatian_language"&gt;Alsatian&lt;/a&gt;, and Ruby is French.&lt;/p&gt;
&lt;p&gt;Were it not for Squeak, Smalltalk might be Latin instead of Italian.&lt;/p&gt;
&lt;p&gt;The most un-Smalltalk like thing about Ruby, to me at least, is the syntax, 
Smalltalk has almost
none, many Smalltalkers say that Ruby has too much. I thought so initially, but now
I&amp;#8217;d argue that the flexibility and
&amp;#8220;sugarary&amp;#8221; aspects of Rubys syntax are what makes it so successful as a host for internal DSLs
like Rake, Rails/ActiveRecord, RSpec, etc. etc.  which would be far less
natural in Smalltalk with its extremely limited syntax.&lt;/p&gt;
&lt;p&gt;One of the complaints I often
heard about Smalltalk was it&amp;#8217;s &amp;#8216;different&amp;#8217; syntax just unary, binary, and keyword message send
expressions, blocks, parentheses for expression grouping, the use of &amp;#8217;;&amp;#8217; to send a message
to the object which got the last one,
and single value assignment, and a way to return a value, everything else,
including class and method definition, and control flow was built from these atoms.&lt;/p&gt;
Ruby probably appeals to a broader audience
since it looks enough like something like Java not to be considered too wierd, at least not at
first.  For one thing in ruby 1 + 2 * 3 is 7, instead of 9 in Smalltalk due to its total lack
of operator precedence.&lt;/p&gt; 
&lt;p&gt;But, syntax differences aside, conceptually both Smalltalk and
Ruby are romance languages, as compared to the Teutonic C++ and it&amp;#8217;s kinder-gentler relative.&lt;/p&gt;
&lt;h2&gt;Language Evolution and Cross-Breeding&lt;/h2&gt;
&lt;p&gt;Programming languages evolve much like natural languages.  They pick up influences from 
other languages and incorporate them with modifications.  English is the equivalent
of a multi-paradigm language, it has been influenced by the languages spoken by both the conquered
and counquerors of English speaking lands.  It&amp;#8217;s been influenced by Vikings, Normans, and Indians (both the Asian and American meanings of the last).
English has a lot of synonym pairs one from French and
one from Anglo-Saxon with it&amp;#8217;s Germanic roots.  Pork and pig; beef and cow; fraternity and brotherhood.  This comes from the days after the Norman conquest when the language of the English court
was French.  Bill Bryson describes this in his book 
&lt;a href="http://www.amazon.com/gp/product/0380715430?ie=UTF8&amp;#38;tag=denhaven2com-20&amp;#38;linkCode=as2&amp;#38;camp=1789&amp;#38;creative=9325&amp;#38;creativeASIN=0380715430"&gt;The Mother Tongue&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=denhaven2com-20&amp;#38;l=as2&amp;#38;o=1&amp;#38;a=0380715430" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&amp;#8221;&amp;#8221;The Mother Tongue&amp;#8221;.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
Many of the words considered &amp;#8220;fancy&amp;#8221; by English speakers are of French origin.  Kent 
Beck told me that while he was working in Zurich on a contract with a Swiss bank, he found that
an effective way of communicating with the programmers there, was to use simple English grammar,
but &amp;#8220;fancy&amp;#8221; English vocabulary.  The latter helped because the Swiss programmers facility with 
French increased the chances that they would share such word.&lt;/p&gt;
&lt;h2&gt;Multi-lingualism&lt;/h2&gt;
&lt;p&gt;There&amp;#8217;s an old joke which goes:&lt;/p&gt;
&lt;blockquote&gt;What do you call a person who speaks two languages? 
&lt;br/&gt;Bilingual.&lt;br/&gt;&lt;br/&gt;
And what do you call someone who speaks only one language?
&lt;br/&gt;An American.
&lt;/blockquote&gt;
&lt;p&gt;Most good programmers, even the Americans, are multi-lingual when it comes to programming 
languages. As it does with natural languages, this gives a broader perspective.&lt;/p&gt;
&lt;p&gt;But multi-lingualism sometimes makes it hard to compartmentalize language concepts.  
Once on a trip to Zurich,
I was having dinner with Erich Gamma, some other Zurich OTIers, and a couple of customers in a
very nice restaurant on the Bahnhofstrasse.  My facility with German fills a small thimble, 
but as I perused the large menu, with no obvious English to be seen, I realised that I was reading
it rather easily, and thought to myself, &amp;#8220;Hmmm, I&amp;#8217;m starting to understand German.&amp;#8221;  Then I 
realized
that the menu was in fact bi-lingual, but the second language was French, a language with which I do have some facility.&lt;/p&gt;
&lt;p&gt;I suspect that the &amp;#8220;coming from x&amp;#8221; quotes in David Black&amp;#8217;s article are the result of this 
difficulty in compartmentalizing by newcomers to Ruby.&lt;/p&gt;
&lt;h2&gt;A Living Language&lt;/h2&gt;
Programming languages, like natural languages, survive best when they evolve, this is what
distinguishes live languages from dead ones. Languages die as the number of speakers diminish, 
despite revival attempts like &lt;a href="http://www.amazon.com/gp/product/014015339X?ie=UTF8&amp;#38;tag=denhaven2com-20&amp;#38;linkCode=as2&amp;#38;camp=1789&amp;#38;creative=9325&amp;#38;creativeASIN=014015339X"&gt;Winnie Ille Pu&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=denhaven2com-20&amp;#38;l=as2&amp;#38;o=1&amp;#38;a=014015339X" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;, 
&lt;a href="http://www.amazon.com/gp/product/0865164207?ie=UTF8&amp;#38;tag=denhaven2com-20&amp;#38;linkCode=as2&amp;#38;camp=1789&amp;#38;creative=9325&amp;#38;creativeASIN=0865164207"&gt;Quomodo Invidiosulus Nomine Grinchus Christi Natalem Abrogaverit: How the Grinch Stole Christmas in Latin&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=denhaven2com-20&amp;#38;l=as2&amp;#38;o=1&amp;#38;a=0865164207" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;,
&lt;a href="http://www.amazon.com/gp/product/1582348251?ie=UTF8&amp;#38;tag=denhaven2com-20&amp;#38;linkCode=as2&amp;#38;camp=1789&amp;#38;creative=9325&amp;#38;creativeASIN=1582348251"&gt;Harrius Potter et Philosophi Lapis (Harry Potter and the Philosopher&amp;#8217;s Stone, Latin Edition)&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=denhaven2com-20&amp;#38;l=as2&amp;#38;o=1&amp;#38;a=1582348251" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;, or 
the &lt;a href="http://la.wikipedia.org/wiki/Pagina_prima"&gt;Vicipaedia&lt;/a&gt;.
&lt;p&gt;Ruby is evolving, the core-team isn&amp;#8217;t asleep, right now ruby1.9 is the cauldron to which new
potions are being added to brew what will emerge as the next major Ruby revision.&lt;/p&gt;
&lt;p&gt;This is another area where Ruby and Smalltalk have similarities. 
Smalltalk started as a paper design by Alan Kay to win
a hallway bet challenging his assertion that he 
&amp;#8220;could define the &amp;#8216;most powerful language in the world&amp;#8217; in &amp;#8216;a page of code&amp;#8217;.&amp;#8221; 
Dan Ingalls then actually implemented it in Basic on a &lt;span class="caps"&gt;NOVA&lt;/span&gt; minicomputer, this 
begat Smalltalk-72,
which begat Smalltalk-76, which begat Smalltalk-80. Smalltalk-80 was the basis for the 
commercial Smalltalks of the pre-Java era, VisualWorks Smalltalk (ParcPlaces commercial Smalltalk-80),
Smalltalk/V which merged with VisualWorks when ParcPlace and Digitalk merged, and &lt;span class="caps"&gt;IBM&lt;/span&gt;/VisualAge
Smalltalk. Squeak is also a child of Smalltalk-80.&lt;/p&gt;
&lt;p&gt;Smalltalk started to freeze when it became commercial.  We tried hard to forge a standard in
&lt;span class="caps"&gt;X3J20&lt;/span&gt; which allowed evolution and variation by underspecifying things as much as we could, but
broad enterprise acceptance slowed things down quite a bit.&lt;/p&gt;
&lt;p&gt;So it&amp;#8217;s exciting to see that Ruby is evolving. I hope that it too doesn&amp;#8217;t get bogged down
in it&amp;#8217;s success.&lt;/p&gt;
&lt;h2&gt;Personal Preferences&lt;/h2&gt;
&lt;p&gt;Finally getting back to my &amp;#8220;Coming from Smalltalk&amp;#8221; quote in ruby-talk, I expressed a personal
viewpoint that Ruby would be well-served if the mechanisms of singleton classes, and their use
as metaclasses were made visible and officially documented parts of the language.
If the rationale for not doing so is to preserve &amp;#8220;freedom-of-action&amp;#8221; in changing the
implementation in future versions, I can understand it, but to used a mixed language 
expression, that is a &amp;#8220;two-edged katana.&amp;#8221;  One of the things which Alan Kay told me a long time
ago was that he was disappointed that so few Smalltalkers experimented with changing and 
extending Smalltalk by building off of the mechanisms of Class, Metaclass, and Behavior.
In Ruby, despite the fact that knowledge of the equivalent implementation is only known 
&amp;#8220;sub-rosa,&amp;#8221; there is much more such experimentation.
Metaprogramming in Ruby is au courant, and lots of code is being written which depends on 
undocumented &amp;#8220;stuff.&amp;#8221;  I have to ask if this, being undocumented that is, is a good thing.&lt;/p&gt;
&lt;p&gt;So, to wrap this all up, while I do &amp;#8220;come from Smalltalk,&amp;#8221;  Today, I live in Ruby!&lt;/p&gt;</description>
      <pubDate>Thu, 21 Jun 2007 15:06:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:e9e90ebe-9145-4ff6-977c-19478dc34a92</guid>
      <author>Rick DeNatale</author>
      <link>http://talklikeaduck.denhaven2.com/articles/2007/06/21/where-i-come-from</link>
      <category>psychology</category>
      <category>ruby</category>
      <category>smalltalk</category>
      <category>humor</category>
      <category>language</category>
      <category>C</category>
      <category>java</category>
      <category>language_wars</category>
      <trackback:ping>http://talklikeaduck.denhaven2.com/articles/trackback/434</trackback:ping>
    </item>
  </channel>
</rss>
