[squeak-dev] Questions about parsing and orthogonal constructs....

Casey Ransberger casey.obrien.r at gmail.com
Tue Nov 2 02:54:38 UTC 2010


Comments inline

On Nov 1, 2010, at 8:35 AM, "gi.joe" <jcmartinez87 at gmail.com> wrote:

> 
> Hello everyone. I'm new to Squeak, and I chose to do a research paper for
> school on it. I have a few questions about the language. My first question
> is what components in Squeak can be successfully parsed by the compiler
> without necessarily creating a full program. For example, can a blank method
> be created? Create variables without using them? etc.
Hard answers. Smalltalk *is* the full program. Your application is a bit like like an extension of Smalltalk. Blank methods are fine; unless you explicitly return a value, the method will happily return self by default. 

> My second question is what constructs in the language are NOT orthogonal.
> I'm not sure if there is a different term for this, but basically it means
> what constructs cannot be used within a construct of the same type. For
> example, can you use a function within a function?
Someone said that Smalltalk hasn't got functions, but I don't think that's really the best way to put it. 

Smalltalk "blocks" look a lot like lambdas, and in modern days have full closure semantics. They're also first class objects, so you can stick them in variables and interact with them more or less like anything else. You can nest blocks.

> If any help can be provided, I would greatly appreciate it. Some examples
> and references to the ANSI Smalltalk Reference Manual would be much
> appreciated as well. I was trying to find the ansers in the ANSI manual
> haven't had much luck.

Check out the free books mentioned in the other response. I have never looked at the ANSI standard; unless you're trying to do your own standards-compliant implementation, it's probably the wrong book to study, because AFAIK, no popular implementation is standard-compliant. 

I'd strongly recommend reading the "Blue Book" instead (Smalltalk-80: the Language and its Implementation.)

Have fun and point us at your project when the time is right!

> -- 
> View this message in context: http://forum.world.st/Questions-about-parsing-and-orthogonal-constructs-tp3022339p3022339.html
> Sent from the Squeak - Dev mailing list archive at Nabble.com.
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20101101/9fb64cbc/attachment.htm


More information about the Squeak-dev mailing list