<?xml version="1.0" encoding="utf-8"?><!-- generator="wordpress/2.0.3" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: What Java Owes to Smalltalk</title>
	<link>http://www.fnordistan.com/archives/2004/08/12/what-java-owes-to-smalltalk/</link>
	<description>Code is Poetry</description>
	<pubDate>Thu, 20 Nov 2008 10:38:20 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.3</generator>

	<item>
		<title>by: Jon H</title>
		<link>http://www.fnordistan.com/archives/2004/08/12/what-java-owes-to-smalltalk/#comment-16</link>
		<pubDate>Fri, 13 Aug 2004 17:10:53 +0000</pubDate>
		<guid>http://www.fnordistan.com/archives/2004/08/12/what-java-owes-to-smalltalk/#comment-16</guid>
					<description>Smalltalk and Objective-C, which is a combination of C and Smalltalk.

Here's a link to an old Usenet post by Patrick Naughton who worked on Java
with Gosling in the early days when Java was called 'Oak'. A bunch of
Objective-C-oriented people from NeXT joined the Oak group in 92/93.

According to this, Gosling was familiar with Smalltalk, while Naughton was
familiar with (and impressed by) Objective-C.

http://www.virtualschool.edu/objectivec/influenceOnJava.html</description>
		<content:encoded><![CDATA[<p>Smalltalk and Objective-C, which is a combination of C and Smalltalk.</p>
<p>Here&#8217;s a link to an old Usenet post by Patrick Naughton who worked on Java<br />
with Gosling in the early days when Java was called &#8216;Oak&#8217;. A bunch of<br />
Objective-C-oriented people from NeXT joined the Oak group in 92/93.</p>
<p>According to this, Gosling was familiar with Smalltalk, while Naughton was<br />
familiar with (and impressed by) Objective-C.</p>
<p><a href='http://www.virtualschool.edu/objectivec/influenceOnJava.html' rel='nofollow'>http://www.virtualschool.edu/objectivec/influenceOnJava.html</a>
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Isaac Gouy</title>
		<link>http://www.fnordistan.com/archives/2004/08/12/what-java-owes-to-smalltalk/#comment-14</link>
		<pubDate>Fri, 13 Aug 2004 17:05:58 +0000</pubDate>
		<guid>http://www.fnordistan.com/archives/2004/08/12/what-java-owes-to-smalltalk/#comment-14</guid>
					<description>1. Learn from Smalltalk.
2. Learn from other languages: Nice, Scala, OCaml, Python, Lua, Clean, ...

Read code http://shootout.alioth.debian.org/langs.php</description>
		<content:encoded><![CDATA[<p>1. Learn from Smalltalk.<br />
2. Learn from other languages: Nice, Scala, OCaml, Python, Lua, Clean, &#8230;</p>
<p>Read code <a href='http://shootout.alioth.debian.org/langs.php' rel='nofollow'>http://shootout.alioth.debian.org/langs.php</a>
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Martin Kobetic</title>
		<link>http://www.fnordistan.com/archives/2004/08/12/what-java-owes-to-smalltalk/#comment-13</link>
		<pubDate>Fri, 13 Aug 2004 14:41:48 +0000</pubDate>
		<guid>http://www.fnordistan.com/archives/2004/08/12/what-java-owes-to-smalltalk/#comment-13</guid>
					<description>You can do 'boolVal or: [ doThat ]' in Smalltalk. For the other one you'd need to extend BlockClosure. If you add something like

BlockClosure&gt;&gt;if: aBoolean

  ^aBoolean ifTrue: [ self value ]

Then you can do

 [ doThat ] if: boolVal

The beauty of it is that there aren't any hardwired, keyword based, control structures. It's all regular messages, so you can add your own at will. The only concern is how readable your extended control structures will be for others.</description>
		<content:encoded><![CDATA[<p>You can do &#8216;boolVal or: [ doThat ]&#8217; in Smalltalk. For the other one you&#8217;d need to extend BlockClosure. If you add something like</p>
<p>BlockClosure>>if: aBoolean</p>
<p>  ^aBoolean ifTrue: [ self value ]</p>
<p>Then you can do</p>
<p> [ doThat ] if: boolVal</p>
<p>The beauty of it is that there aren&#8217;t any hardwired, keyword based, control structures. It&#8217;s all regular messages, so you can add your own at will. The only concern is how readable your extended control structures will be for others.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Torsten Bergmann</title>
		<link>http://www.fnordistan.com/archives/2004/08/12/what-java-owes-to-smalltalk/#comment-8</link>
		<pubDate>Fri, 13 Aug 2004 08:21:06 +0000</pubDate>
		<guid>http://www.fnordistan.com/archives/2004/08/12/what-java-owes-to-smalltalk/#comment-8</guid>
					<description>Hi - you should notice that controls structures in Smalltalk are implemented as methods. Therefore if
you need something like your perl example &quot;doThis() if $boolVal;&quot; in Smalltalk you just have to add
a new method #if: to the class BlockContext/BlockClosure (depending on the dialect you use this is the
class for a block) so you can write:

  [doThis] if: aBoolean

The implementation of this method is easy:

if: aBoolean
     aBoolean ifTrue: [self value]

All this is possible because blocks are objects like anything other in smalltalk,
so you can construct them dynamically, pass them as arguments, ...
This is one of the points that make Smalltalk so rich - think of a &quot;repeat-until&quot;
construct: you have it in Pascal, but not in C++, Java and Smalltalk. The difference
is that it is easy to add in Smalltalk without changing the Parser or asking
the compiler vendor. Be warned: This makes Smalltalk a drug - if you've started to 
understand it's ideas you will never like to return to other languages. ;)</description>
		<content:encoded><![CDATA[<p>Hi - you should notice that controls structures in Smalltalk are implemented as methods. Therefore if<br />
you need something like your perl example &#8220;doThis() if $boolVal;&#8221; in Smalltalk you just have to add<br />
a new method #if: to the class BlockContext/BlockClosure (depending on the dialect you use this is the<br />
class for a block) so you can write:</p>
<p>  [doThis] if: aBoolean</p>
<p>The implementation of this method is easy:</p>
<p>if: aBoolean<br />
     aBoolean ifTrue: [self value]</p>
<p>All this is possible because blocks are objects like anything other in smalltalk,<br />
so you can construct them dynamically, pass them as arguments, &#8230;<br />
This is one of the points that make Smalltalk so rich - think of a &#8220;repeat-until&#8221;<br />
construct: you have it in Pascal, but not in C++, Java and Smalltalk. The difference<br />
is that it is easy to add in Smalltalk without changing the Parser or asking<br />
the compiler vendor. Be warned: This makes Smalltalk a drug - if you&#8217;ve started to<br />
understand it&#8217;s ideas you will never like to return to other languages. <img src='http://www.fnordistan.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Peter Seibel</title>
		<link>http://www.fnordistan.com/archives/2004/08/12/what-java-owes-to-smalltalk/#comment-7</link>
		<pubDate>Fri, 13 Aug 2004 05:04:13 +0000</pubDate>
		<guid>http://www.fnordistan.com/archives/2004/08/12/what-java-owes-to-smalltalk/#comment-7</guid>
					<description>Historically speaking, I think most of the Smalltalk in Java came by way of Objective C. But your point remains. -Peter</description>
		<content:encoded><![CDATA[<p>Historically speaking, I think most of the Smalltalk in Java came by way of Objective C. But your point remains. -Peter
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Adam Spitz</title>
		<link>http://www.fnordistan.com/archives/2004/08/12/what-java-owes-to-smalltalk/#comment-6</link>
		<pubDate>Fri, 13 Aug 2004 05:00:32 +0000</pubDate>
		<guid>http://www.fnordistan.com/archives/2004/08/12/what-java-owes-to-smalltalk/#comment-6</guid>
					<description>If you find yourself missing the Perl thing too much, you could implement #if: and #unless: for the BlockContext class. :)</description>
		<content:encoded><![CDATA[<p>If you find yourself missing the Perl thing too much, you could implement #if: and #unless: for the BlockContext class. <img src='http://www.fnordistan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: James Ladd</title>
		<link>http://www.fnordistan.com/archives/2004/08/12/what-java-owes-to-smalltalk/#comment-5</link>
		<pubDate>Fri, 13 Aug 2004 04:54:22 +0000</pubDate>
		<guid>http://www.fnordistan.com/archives/2004/08/12/what-java-owes-to-smalltalk/#comment-5</guid>
					<description>If you keep in mind that everything in smalltalk is &quot;Receiver Message [: argument]&quot; then something like &quot;(someBoolean) ifTrue: [someblock].&quot; is rather elegant and not hard to understand. 
BTW - Apache has collection library enhancements that mimic Smalltalk's.</description>
		<content:encoded><![CDATA[<p>If you keep in mind that everything in smalltalk is &#8220;Receiver Message [: argument]&#8221; then something like &#8220;(someBoolean) ifTrue: [someblock].&#8221; is rather elegant and not hard to understand.<br />
BTW - Apache has collection library enhancements that mimic Smalltalk&#8217;s.
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
