Self (along with Scheme) was supposedly one of the big influences on Brendan Eich when he was creating JavaScript. Neat to know it's still out there.
New release of Self programming language
11–20 of 40 posts
Re: New release of Self programming language
#12I like to think that all three languages benefited from the competition.
Re: New release of Self programming language
#13Self (along with Scheme) was supposedly one of the big influences on Brendan Eich when he was creating JavaScript. Neat to know it's still out there.
Wonder how JS would have gone if it had fully embraced its prototypal nature instead of hiding it behind Java-like syntax. For as long as JS has been around, there were people clamoring for classes in the language, or thinking that it had classes, or implementing a class-like structure, until finally ES6. But it didn't have to be that way. And now the sentiment is that OOP is bad, and inheritance is evil, and classes…
Are there any codebases around 100K to 1 M lines of code written in a prototypal style, which are actually in production use?
You can claim thousands of such systems for classes. In that sense, classes are a success. That people write horrible class-based code isn't a knock against them. People also write horrible procedural code. Most code is bad. But there is some code with classes that is very good.
There was sentiment in the 90's and early 2000's that OOP is bad. I think the world has learned how to use classes since then -- e.g. no more large inheritance chains and fragile base classes. Not everything is an object -- some things are just functions, and some things are just data with no behavior.
As far as I can see, prototypes are worse along all dimensions than classes.
Re: New release of Self programming language
#14Can we ever get away from the misnomer of "prototype-based OO"? In Self we have two ways of specialization: 1. Prototypes 2. Parents Prototypes are objects that are "cloned" to create instances, a very simple and direct notion of inheritance. We create an object (a "prototype") with properties that apply to a larger set of objects, and then for each instance we copy (clone) it and then add or modify properties as nec…
Re: New release of Self programming language
#15No Windows release. Hmm.
Re: New release of Self programming language
#16Earlier quoted context omitted.
Wonder how JS would have gone if it had fully embraced its prototypal nature instead of hiding it behind Java-like syntax. For as long as JS has been around, there were people clamoring for classes in the language, or thinking that it had classes, or implementing a class-like structure, until finally ES6. But it didn't have to be that way. And now the sentiment is that OOP is bad, and inheritance is evil, and classes…
I honestly don't get what's better about prototypes than classes. In particular, I don't see that the prototypal style is supported empirically. Are there any codebases around 100K to 1 M lines of code written in a prototypal style, which are actually in production use? You can claim thousands of such systems for classes. In that sense, classes are a success. That people write horrible class-based code isn't a knock…
Re: New release of Self programming language
#17Earlier quoted context omitted.
I honestly don't get what's better about prototypes than classes. In particular, I don't see that the prototypal style is supported empirically. Are there any codebases around 100K to 1 M lines of code written in a prototypal style, which are actually in production use? You can claim thousands of such systems for classes. In that sense, classes are a success. That people write horrible class-based code isn't a knock…
Or perhaps neither? It's conventional wisdom these days that composition often works better than inheritance.
By the way, "composition" is ambiguous:
- Composition of classes is usually a shortcut used to describe inheritance of interfaces and implementation through aggregation (there's only one mainstream language today that supports this natively: Kotlin).
- Composition of functions, which is pretty much mainstream in most popular languages today.
Re: New release of Self programming language
#18Earlier quoted context omitted.
Wonder how JS would have gone if it had fully embraced its prototypal nature instead of hiding it behind Java-like syntax. For as long as JS has been around, there were people clamoring for classes in the language, or thinking that it had classes, or implementing a class-like structure, until finally ES6. But it didn't have to be that way. And now the sentiment is that OOP is bad, and inheritance is evil, and classes…
I honestly don't get what's better about prototypes than classes. In particular, I don't see that the prototypal style is supported empirically. Are there any codebases around 100K to 1 M lines of code written in a prototypal style, which are actually in production use? You can claim thousands of such systems for classes. In that sense, classes are a success. That people write horrible class-based code isn't a knock…
However, the flip side of this is that more freedom is not always good for more readable software. GOTO, for example, can express any control flow that for/while/do-while/if/switch can and a number that it cannot (coroutines/exceptions/etc.), but as an industry we've moved away from GOTO because most programmers can't hold this flow control in their heads. Prototypes are the same way: they grant a lot of freedom to implement fancy abstractions, but many programmers seem to be unable to understand the resulting abstractions, so they don't find widespread use.
Asking for codebases of 100K-1M lines in prototype-based languages is the wrong question. Because prototypes let people define abstractions that other programmers find unreadable, they a.) let you write equivalent software in fewer lines of code and b.) get rewritten in class-based languages as soon as you have more than a handful of programmers working on the codebase. They're much more likely to be used by a small team of hackers who sells their startup for $40M or so and then vests in peace while another team rewrites all their code in Java than by a big company.
If you broaden the question to "has anyone ever made significant money working on or with Self", the answer is yes:
http://merlintec.com/old-self-interest/msg01011.html
(Fun fact: Urs Hoelzle, Animorphic's CTO and sender of the second message in that thread, later went on to become employee #9 and the first executive hire at Google.)
Re: New release of Self programming language
#19Wow. For those who don't know, there was a big 'language bake off' at Sun between TCL, Java, and Self (all being funded by Sun Labs) and Bert Sutherland (then director of Sun Labs and brother of Ivan) required that the language changes stop and then we'd look at each one, and decide which one to move forward on. When the world sort of exploded at the WWW conference held in Darmstadt Germany in 1995, Java officially '…
Re: New release of Self programming language
#20Self (along with Scheme) was supposedly one of the big influences on Brendan Eich when he was creating JavaScript. Neat to know it's still out there.
That's really doubtful. Self's delegation-based inheritance was expedient for quickly implementing an object model instead of having to build a class system, the influence never seems to have gone any deeper.
The one big influence on Javascript was Scheme, that was the original idea, when Netscape's execs asked for a more java-style language for marketing reasons, special-casing a single parent slot was an easy way to bolt an object system into the thing.
From what little I looked at it, delegation (through parent slots) is everywhere in Self, it's used for inheritance but also for mixins and scopes chaining and… It's not just an object model, it's a core semantic principle and tool.