Steve Dekorte wrote:
Interesting, what's the smallest Self could be squeezed into and still be useful? Would a 100K version be possible than ran as fast as other scripting languages like Python? The Ruby scripting language has become very popular as a web scripting language despite the fact that it uses a Smalltalk like syntax. Maybe Self could become a popular scripting language if it was less monolithic.
Ruby does not use a "Smalltalk-like syntax".
- samantha
Samantha Atkins wrote:
Ruby does not use a "Smalltalk-like syntax".
Ruby took the 'best' of a couple of languages among which Smalltalk, so it had to 'fix' the Smalltalk syntax.
Since the Byte article on Ruby I lost interest in trying it, it looks broken to a Smalltalker, specifically the absence of named parameters (keywords), the implied declaration of block parameters (if a method takes a block as an artgument Ruby uses zero characters to indicate that) and the dichotomy between blocks and closures all seem a step backwards to me.
At least Self 'fixes' the Smalltalk syntax without killing it.
Cheers!
Reinout -------
Reinout Heeck wrote:
Samantha Atkins wrote:
Ruby does not use a "Smalltalk-like syntax".
Ruby took the 'best' of a couple of languages among which Smalltalk, so it had to 'fix' the Smalltalk syntax.
Since the Byte article on Ruby I lost interest in trying it, it looks broken to a Smalltalker, specifically the absence of named parameters (keywords), the implied declaration of block parameters (if a method takes a block as an artgument Ruby uses zero characters to indicate that) and the dichotomy between blocks and closures all seem a step backwards to me.
You would reject a language over named parameters? To each their own I guess but this seems like a weak criteria. Blocks are not closures. True closures don't exist in Smalltalk. Smalltalk syntax leaves much to be desired. Which is not surprising. It is surprising to see a language with rather different design and usage criteria criticized for not being enough like Smalltalk.
- samantha
Samantha Atkins wrote:
Reinout Heeck wrote:
Ruby took the 'best' of a couple of languages among which Smalltalk, so it had to 'fix' the Smalltalk syntax.
Since the Byte article on Ruby I lost interest in trying it, it looks broken to a Smalltalker, specifically the absence of named parameters (keywords), the implied declaration of block parameters (if a method takes a block as an artgument Ruby uses zero characters to indicate that) and the dichotomy between blocks and closures all seem a step backwards to me.
You would reject a language over named parameters? To each their own I guess but this seems like a weak criteria.
I wrote that that is _just one_ of the reasons so the answer to that is no. That said I happen to find named parameters a *great* instrument for both readability and defect avoidance. Therefore I find it strange that a language that claims to take the best of a couple of languages among whitch Smalltalk didn't adopt them.
Blocks are not closures.
True, but blocks can be treated as a degenerate case of closures like Smalltalk does, so the need for two different concepts and syntaxes falls away.
True closures don't exist in Smalltalk.
Huh? I guess you are mistaken here. As I understand it blocks in Smalltalk are true closures.
If a Smalltalk method returns a block and that block references local variables of that method, the block's variable references are bound to the values of the variables as they were during the method invocation.
Why don't you consider that 'true' closures?
Smalltalk syntax leaves much to be desired. Which is not surprising.
I disagree strongly, I find it one of the cleanest and easiest syntaxes I encountered, yielding very readable and compact code with a very low defect count on first composition. It is one of the few syntaxes that can be learned *completely* within one or two hours.
It is surprising to see a language with rather different design and usage criteria criticized for not being enough like Smalltalk.
Since the author claims to have borrowed ideas from Smalltalk I find it strange that some very good things got omitted/altered for the worse.
If you feel like continuing this thread I suggest we find a more appropriate forum for it.
Cheers!
Reinout -------
Steve Dekorte asked:
Interesting, what's the smallest Self could be squeezed into and still be useful?
Little Smalltalk 4 has a virtual machine of around 30KB and an image (badly encoded - could be much smaller) of 82.4KB. I see no reason why a "Little Self" couldn't be even smaller than this. A simple interpreter would be slow, of course, but would probably at least beat TCL ;-)
Dru Nelson wrote:
Small note.. Cel is not monolithic. It is declarative like some of the newer smalltalks (Pocket Smalltalk).
Before Self 4, I used to work without snapshots (my disk quota at the university was far too small for this). So I would always start out with an empty world and then load the set of .self files that I needed. It is still possible to work this way today, but the nice Demo.snap world and large disks don't make it very tempting.
I think the big problem for Self would be the compiler technology. There is a lot there for a particular architecture.
There are several Selfs out there (two in Java, even!) and only the main one (Sun's 4.1.2) has this compiler technology. You could use the same style of virtual machine you employed in Cel to build a Little Self.
Samantha Atkins and Reinout Heeck had some interesting comments on Ruby vs Smalltalk:
Language elements in general, but syntax most of all, are a matter of taste, so it makes no sense to talk about making it better or worse. But since we are talking about the history of OO, it is worth mentioning how the Smalltalk syntax came to be.
Smalltalk-72 didn't have a fixed syntax: each class had code which dynamically parsed the token stream that represented code. This allowed programmers to go in their own direction, so a lot of different things were tried. Smalltalk-74 cleaned things up a bit without really changing anything. There were two drawbacks - compilation was not possible (since programs only had dynamic meanings, not static ones) and people found it hard to understand and use code written by others. So Dan Ingalls took a good look at all that had been done and used the ideas that had worked best to produce a fixed syntax for Smalltalk-76, which continued to evolve slightly in later versions.
In constrast, the syntax is one of the first things fixed in a language design (except for Dylan, which went from Lisp to Pascal rather late in life) before any programs have been written. Minor tweaks can happen later as the result of experience in using the language, but nothing like what happened to Smalltalk.
Again, this is a matter of taste. Some people love keyword messages and others hate them. But they were the result of some three or more years of practical experience by a bunch of really smart people.
About blocks - they are closures in Self and many other Smalltalks, but not in all of them. Squeak is an example - block variables are allocated in the home context, which leads to several problems. A patch hid the problem of using the same name in several lexical levels, but any attempt to recursively use a block will show that it is not a real closure. There have been several attempts to fix this, though it only makes a difference to very few people.
-- Jecel
Jecel Assumpcao Jr wrote:
Little Smalltalk 4 has a virtual machine of around 30KB and an image (badly encoded - could be much smaller) of 82.4KB. I see no reason why a "Little Self" couldn't be even smaller than this. A simple interpreter would be slow, of course, but would probably at least beat TCL ;-)
I think a "Little Self" that was as "small" and at least as fast as the common web scripting languages(Python, Perl) would give the language it's best shot at getting widespread use. I guess that may have never been a goal of the original Self project, but it seems to me that it is the shared goal of all these other Self implementations.
Language elements in general, but syntax most of all, are a matter of taste, so it makes no sense to talk about making it better or worse.
It does if you value people choosing to use the language.
Syntax seems to have been a barrier to the general use of the most technically advanced high level languages (Lisp and Smalltalk). Would we have had to wait 20 years to see things like garbage collection used in a mainstream language if these languages hadn't been so ambitious?
It's interesting that the two languages of the web are split on their adoption of these two innovations of Self - JavaScript got a proto object model and Java got some of the compiler technology.
Steve
self-interest@lists.selflanguage.org