Re: [Newbies] Two questions about Smalltalk language design

2012-12-30 Thread Casey Ransberger
Top post: I never once thought about that, and it makes me smile. On Dec 30, 2012, at 7:40 AM, Bert Freudenberg wrote: > On 2012-12-27, at 01:32, Sebastian Nozzi wrote: > >> Why do ST methods return "self" if nothing is explicitly returned? > > > One very simple reason has not been stated y

Re: [Newbies] Two questions about Smalltalk language design

2012-12-30 Thread Yoshiki Ohshima
On Sun, Dec 30, 2012 at 7:40 AM, Bert Freudenberg wrote: > On 2012-12-27, at 01:32, Sebastian Nozzi wrote: > >> Why do ST methods return "self" if nothing is explicitly returned? > > > One very simple reason has not been stated yet: In the Virtual Machine, > returning self is simpler and more ef

Re: [Newbies] Re: Two questions about Smalltalk language design

2012-12-30 Thread Levente Uzonyi
On Thu, 27 Dec 2012, Benjamin Schroeder wrote: On Thu, Dec 27, 2012 at 1:04 PM, Joseph J Alotta wrote: 1. If a message does not return self, then you wouldn't be able to chain messages together or to cascade messages. for example: |s| s := Sphere new.

Re: [Newbies] Two questions about Smalltalk language design

2012-12-30 Thread Bert Freudenberg
On 2012-12-27, at 01:32, Sebastian Nozzi wrote: > Why do ST methods return "self" if nothing is explicitly returned? One very simple reason has not been stated yet: In the Virtual Machine, returning self is simpler and more efficient than returning any other object. Smalltalk byte codes imple