7 ms·
New release of Self programming language
- patrec 9y agoHas someone here got some examples of things that are more neatly expressed in self than javascript and other obvious suspects (e.g. python, racket, common lisp, smalltalk)?
- doublec 9y agoI'm not sure about comparing to those languages but I did a post comparing other prototype based languages https://bluishcoder.co.nz/2009/07/16/prototype-based-programming-languages.html https://bluishcoder.co.nz/2009/07/16/prototype-based-program... For me though it's not about the Self language but about the combination of the language and environment. I did a screencast attempting to show some of how Self development is done https://bluishcoder.co.nz/2015/11/18/demo-of-programming-in-self.html https://bluishcoder.co.nz/2015/11/18/demo-of-programming-in-...
- analognoise 9y agoNo Windows release. Hmm.
- russellallen 9y agoIt's on the list but a big task because of the Unix assumptions build into the VM and the need to redo the graphics backend both as primitives and to hook it into the Self level GUI framework.
- deleted 9y ago[deleted]
- krallja 9y agoSelf (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.
- goatlover 9y agoWonder 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 the worse, forcing one to predefine a taxonomy that's likely to need refactoring. But prototypal languages can be easily changed. Just change the parent slot(s), or modify the object itself, etc.
- protomyth 9y agoI wish JavaScript had been more like NewtonScript with Java influenced syntax instead of NS's Pascal-ish parts. Plus NewtonScript's frame and two parents was much nicer.
- goatlover 9y agoI wish IO or Self had been more successful, just to see how far one could push a pure prototyping language. IO is more flexible than JS, in that it has (almost) no syntax, just messages to objects, which means you can completely modify the syntax, making DSLs a natural fit for the language.
- deleted 9y ago[deleted]
- chubot 9y agoI 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 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.
- bhk 9y agoCan 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 necessary for the instance. Self had optimizations to deal with this so instances did not end up being very fat. Parents are objects that other objects "inherit from". At run-time property lookups are delegated to a parent. The difference between a parent and a prototype is that changes to the prototype do NOT affect the derived instances. Changes to a parent DO affect the derived instances. So, when I read about "class-based" versus "prototype-based" languages, I cringe. It is really "class-based" versus "parent-based". How did cloning get confused with run-time delegation? Self introduced the notion of self-describing instances. That is the essential coolness. The simplifying notion. http://www.selflanguage.org/_static/published/self-power.pdf http://www.selflanguage.org/_static/published/self-power.pdf
- cadillackness 9y agoAnd to make it even worse, Object.create does parent-relationship, and Object.assign does the cloning(if you squint a little bit). Which seems like it should be flip-flopped, since "create" is closer to "cloning" than "assign" is. Even the es5 improvements ended up getting it wrong!
- goatlover 9y agoThe paper you linked to does mention prototypes as Self's alternative to classes. Edit: Oh I see. Cloning is the alternative to instantiation. Parent slots are the alternative to classical inheritance.
- endlessvoid94 9y agoAgree. I'd also like to direct interested viewers to this other neat paper, entitled "Annotating objects for transport to other worlds": https://pdfs.semanticscholar.org/61f1/14dce92b7a49dbb8f981f2269d5121e46ff6.pdf https://pdfs.semanticscholar.org/61f1/14dce92b7a49dbb8f981f2...
- 9y ago
- ChuckMcM 9y agoWow. 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 'won' and both Self and TCL were de-committed. (not canceled per-se but not getting any more funding either). I like to think that all three languages benefited from the competition.
- pron 9y agoI believe that much of the work Sun had done on Self found its way to Java in the form of HotSpot.
- hipitihop 9y agoNot to take anything from Self, but in regards to HotSpot, a more accurate history attributes the lineage to Smalltalk and the Animorphic team. Some details here https://en.m.wikipedia.org/wiki/HotSpot https://en.m.wikipedia.org/wiki/HotSpot
- pron 9y agoRight. Sun incorporated Animorphic's work into Self, and later purchased Animorphic and the technology became known as HotSpot.
- saurik 9y agoDo you know what caused Java to "win" when the world exploded?
- ChuckMcM 9y agoAt the time it was the ability to construct executable content inside a web page. Javascript now dominates that space, but up until WWWC 2 pretty much everyone was stuck with page layout primitives. It made it possible to see a path to where we are today and so everyone wanted their browser to have it, and if their browser didn't have it they could run the HotJava browser and get it. Bottom line, it demonstrated an answer to a problem that a lot of people were having, and it promised to answer that problem in an 'open source' kind of way.