Lambda the Ultimate

inactiveTopic Prothon
started 3/26/2004; 11:21:00 AM - last post 3/30/2004; 1:33:01 AM
andrew cooke - Prothon  blueArrow
3/26/2004; 11:21:00 AM (reads: 12823, responses: 7)
Prothon
A protoype based variant of Python.

Prothon is a fresh new language that gets rid of classes altogether in the same way that Self does and regains the original practical and fun sensibility of Python. This major improvement plus many minor ones make for a clean new revolutionary break in language development. Prothon is quite simple and yet offers the power of Python and Self.

From /.
Posted to OOP by andrew cooke on 3/26/04; 11:24:47 AM

Kragen Sitaker - Re: Prothon  blueArrow
3/26/2004; 9:28:28 PM (reads: 667, responses: 0)
Heh, it's like Python minus taste (because minus Guido.)

Mitchell N Charity - Re: Prothon  blueArrow
3/27/2004; 9:54:13 AM (reads: 604, responses: 2)
In languages where the oo layer is built on a non-oo layer, fundamental oo design changes like this are rather easier. Lisps, Tcl, MLs, Perl1, etc, etc.

Are there other approaches which give similar flexibility? Any really gonzo MOPs out there? Or any "design space toolkit" oriented, rather than "point solution", oo designs?

Sjoerd Visscher - Re: Prothon  blueArrow
3/27/2004; 10:32:15 AM (reads: 602, responses: 0)
Flexibility is nice, but useless when the libraries are implemented in one programming style. That programming style will be the only natural style of the language.

andrew cooke - Re: Prothon  blueArrow
3/27/2004; 10:59:54 AM (reads: 592, responses: 0)
Lua builds OO on something that's not, but I don't think it's really much different to Python (something is called to handle failure on hash table lookup, iirc, and it uses a little syntactic sugar to hide "self").

Wasn't CLOS intended as a design space toolkit as much as a point solution? I don't know that it's used that way much, but that was the impression I got from Kiczales's book (otoh I didn't finish it...).

Isaac Gouy - Re: Prothon  blueArrow
3/27/2004; 1:03:32 PM (reads: 567, responses: 0)
Sjoerd: the libraries... the only natural style
So true.

Mitchell: where the oo layer is built on a non-oo layer, fundamental oo design changes like this are rather easier
Are we just saying that to change the oo design, we need access to the oo implementation? (That's why so many experiments took place with Smalltalk - the computational structures are written in Smalltalk and open to modification.)

We seem to have been suffering an avalanche of me-too languages. If only we could learn from others' mistakes:

Finally, in designing Self, we have learned one lesson by making mistakes: examples can persuade the designer to include additional features which later turn out to produce incomprehensible behavior in unforeseen circumstances. This might be called the language designer's trap. Minimalism, simplicity and consistency are better guides. They benefit every programmer, not just the ones who need advanced features. We suspect that many of today's object-oriented languages could profit by dropping features.
Programming as an Experience: The Inspiration for Self

Chris Rathman - Re: Prothon  blueArrow
3/27/2004; 9:00:48 PM (reads: 497, responses: 0)
andrew: Lua builds OO on something that's not, but I don't think it's really much different to Python (something is called to handle failure on hash table lookup, iirc, and it uses a little syntactic sugar to hide "self").

Lua's OO is very similar to JavaScript's - since they're both in the prototype tradition of Self, that's probably not accidental. Been a couple of year's since I looked at Lua and a lot of improvement has been done to the language, but getting the vlookup to work is simply a matter of adding a fallback function.

-- use fallback to do inheritance dispatch
function Inherit(object, field)
   if field == "parent" then return nil end
   if type(object.parent) ~= "table" then return nil end
   return object.parent[field]
end
setfallback("index", Inherit)
From my limited understanding, this is the way that most dynamic OO work, other than the fact that there's syntactic sugar to hide the vtable. In point of order, such a fallback mechanism is quite flexible in that it can be used in other fashions - such as multiple dispatch. The ability to control the dispatch mechanism is quite a powerful tool in certain programming situations.

Ian Bicking - Re: Prothon  blueArrow
3/30/2004; 1:33:01 AM (reads: 273, responses: 0)
Here's my own reaction to Prothon:

http://blog.colorstudy.com/ianb/weblog/2004/03/30.html#P77