The Slate Programming Language
An anonymous reader writes "I know that we have had an influx of new programming languages of late, but I feel that this one merits special attention. Theoretical computer scientists and long-time Squeak and LISP contributors Brian Rice and Lee Salzman have been rapidly developing a language called Slate. It draws on the various strengths of the Self, Smalltalk, and LISP languages. To quote from the website: 'Slate is a prototype-based object-oriented programming language based on Self, CLOS, and Smalltalk. Slate syntax is intended to be as familiar as possible to a Smalltalker, rather than engaging in divergent experiments in that respect.' The beta release is currently being written in Common LISP."
I prototyped this mail using it
Do not try to read the dupe, thats impossible. Instead, only try to realize the truth
What truth?
There is no dupe
And for the rest of the world? Oh wait, sorry, Smalltalkers are gods among programmers. So foolish of me to think of myself before the Smalltalkers.
True story.
If the new language doesn't support your needs, shut up and don't use it.
Use what is best for the situation and don't whine.
at least you admit it. that's the first step to recovery.
A block closure is an object representing an encapsulable context of execution, containing local variables, input variables, the capability to execute expressions sequentially, and finally returns a value to its point of invocation. The default return value for a block is the last expression's value; an early return can override this.
This is a language for people who like obscure semantics.
Yes, closures are useful. I've used them in LISP. I even used one once in production code in Perl, to do some error handling cleanly. But when the manual starts out with closures, it's clear that somebody is getting too cute.
This is a language for "l33t haxxors", of the old MIT AI Lab persuasion. Check out "instance specific dispatch". Now that's designed to totally confuse maintainers.
I C sea Slates on the C Shore!
Even though, admittedly, this looks is a joke post, I couldn't help but think this the moment I noticed the article: "I don't really need a programming language that hates Catholic, can't grasp the realities of free-market economics, and is determined to write-in Howard Dean on the 2004 elections ballots..."
i think smalltalk++ would be a better approach than inventing a new language. Look at C++: it's backwards compatable with C, so a C coder is already a C++ coder and can slowly start making use of new C++ features.
Do you even lift?
These aren't the 'roids you're looking for.
Slate is a prototype-based object-oriented programming language based on Self, CLOS, and Smalltalk.
From a recent post:
Prothon is a new industrial-strength, interpreted, prototype-based, object-oriented language that gets rid of classes altogether in the way that the Self language does.
Does this point to a trend in language design?
I hear there's rumors on the Slashdots
That link has an awful lot of plus signs. As if you're trying to hide something on the end of the URL. But what could it be? Maybe if I clic---No! Ow! My eyes!
I can't believe they changed the goatse.cx layout.
True story.
Who gives a shit about the real world. None of the tools you cubicle-dwelling corporate serfs love so much ever came from the real world. All your programming tools come from research labs -- mere leftovers thrown away by academics once they grow bored of playing with them.
You code monkeys are nothing but low-skilled craftsmen, so when real scientists speak, please sit down and shut up, mkay?
Confusing things like:
:index | newOC addLast: (oc at: index)].
3 + 4 * 5 " ==> 35 (not 23) "
and
(3 / 4) == ( 3 / 4) "==> false"
give pause for concern.
But the example code snippet for the curious @ dispatch operator uncommented and unexplained takes the cake:
"
oc@(OrderedCollection traits) copyFrom: start to: end
[| newOC |
end start ifTrue: [^ oc newEmpty].
newOC: (oc traits newSize: end + 1 - start).
start to: end do: [|
newOC
].
"
How could someone argue with a straight face that this gobblygook is progress in programming languages?
Thats MY nick..... So, they're saying I'm a smalltalker with a lisp?
:(
Shhhtop it!
[sig]www.masterslate.org[/sig]
And they say its syntax is easier to understand than LISP? I wonder what they're smoking...
HAND.
In the third case you might find out that you can get by with a set of "prototype" objects to copy from and you don't need classes at all. But to actually eliminate classes you will have to find solutions to the other things they do for you like hold the behaviors for the objects (you can put them in the objects themselves, for example) and reflection (Self uses special "mirror objects" for that).
There are several different styles of prototype based languages.
Man, and here I am writing my own little VM for a prototype OO system.. seems to be all the rage nowadays :D. I'm liking the recent trends of languages evolving to use simpler and simpler higher level semantics. I am a fan of smalltalk and self, but not their syntax. Their language environment and semantics, though, are worth pursuing.
One of the reasons I like prototype OO (specifically, delegation-based prototype OO, as opposed to languages that use embedding), is that a lot of _other_ dynamic language models fit well on top of it. For example, it would be very simple to make a Python -> Self compiler, because constructs that self exposes can be used directly to implement more specific class-oriented pythonic constructs. It leads me to beleive that a prototype-oo oriented base-vm can serve as a good abstract platform environment for several dynamic 'scripting' languages.
I'm not sure about the multiple dispatch though. I think multi-dispatch can be confusing.. especially in languages like these where the notion of runtime types is muddled quite a bit of the time.
-Laxitive
It's going to be based on COBOL, but will add the most annoying features of all of the other programming languges, and will leak memory like a firehose through a collander.
Objective C borrows both syntax and semantics from Smalltalk (on top of C itself, of course). It's a nice small language.
Professional Wild-Eyed Visionary
Yet another language turns up that claims its virtual parents are SmallTalk, Lisp, and Self...
e ntation /NewtonScriptProgramLanguage.pdf
It would seem that Apple may have had it right ten years ago when they made NewtonScript, the native language of their Newton computers, since that language too claimed SmalllTalk, Lisp and Self as its antecedents.
Having had a brief look though at the documentation for Slate, and yesterdays Prothon, I can't help but feel that Apple did a much better job with NewtonScript and the Newton environment. NewtonScript seems to me to be much more mature and better thought out than these two examples.
As for comments that I read here about prototype-based languages not being suitable for application development and are effectively only the domain of accademics, I say bullshit. Class-based programming really isn't the only method of OO development, and prototypes can be equally effective. Many thousands of applications were written for the Newton, and they all used NewtonScript and its prototype-based object model. Prototypes can usually be used in a very similar way to classes, and most class-like behaviour can easily be simulated.
If you're interested in finding out more about how NewtonScript worked and functioned there reference manual can be found here:
http://www.unna.org/unna/development/docum
For a discussion of prototype vs. class based programming consult Appendix C of the NewtonScript reference manual.
This new Slate language looks just like Smalltalk only with new features that nobody actually wants, such as prototypes instead of classes. AFAICT, it hasn't improved on any of the above problems and has actually made some of them worse. IOW, it's doomed.
Scallscript is a start. It's definitely the best of the breed. Personally, I think the greatest barrier to acceptance of Slate / Smalltalk / Smallscript / Squeak / Whatever is the language syntax. Programmers just don't yoda talking like, and a slightly-off Germanic style of grammar just doesn't fit well with an activity like programming that is more mathematical and logical than like communication.
Dylan is very not prototyped-based. Its class-based. Extremely cool language, though.
A deep unwavering belief is a sure sign you're missing something...
I remember Dylan, as a matter of fact I still have the book somewhere. It was another amalgam of programming language concepts that never went anywhere.
As elegant and admired as Lisp and Smalltalk are, they aren't exactly the most heavily used programming languages available (and I say that even though I love Smalltalk). Just because a language appeals to language designers, doesn't mean it's going to be embraced by the masses of programmers out there in the trenches. And the more of a mindshift necessary to use it, the less likely it will succeed.
People sometimes disparage C++, but it gained acceptance because C programmers could get their work done using it even if they weren't doing OOP programming. Evolution works where revolution fails.
What's wroing with prototype OO? You can use it in a completely class-based way if you wish. Prototyping only allows more flexibility. Many things in OO languages, such as Python exceptions, require a hierarchy of objects so they use classes. But this a hack; exceptions are objects, not classes. Although prototype-oriented languages haven't been used extensively in buisness contexts, neither have languages with type systems more advanced than Algol because the jump to a language that's not directly decendent from C is too great (unless it's from Microsoft, but for Microsoft they'd switch to assembly if it was marketed properly). Compared to FP, prototypes are almost completely unused in academia or any other sort of "ivory tower". What makes it difficult for inhreritance management? Daniel Ehrenberg
"Object and inheritance management" is only an issue for those who don't bother to analyze the problem and architect a solution. Slapping together code without understanding the problem is not "prototyping" -- it's wasting time.
Prototypes are for understanding the application requirements, not for "scripting." If you compare prototyping tools to production applications, you are completely and thoroughly missing the point for their existance.
I do not fail; I succeed at finding out what does not work.
Purely prototype-based languages don't really compete with their more structured (class-based) cousins, though. One of the main benefits of prototype-based langauges is that they give a lightweight way to create an abstraction - you don't necessarily have to create a class first. This isn't necessarily a pure win. The structure provided by classes can be useful, too. A good language should provide both capabilities, no matter what mechanisms it uses to do that. It's possible Slate does this, I haven't looked.
Another good candidate mechanism for lightweight abstraction is first class anonymous functions, i.e. lambda, as found in Scheme, Lisp, Javascript, Perl (Python got it wrong, unfortunately). Having real lambdas tends to eliminate a lot of the problems which other languages find themselves trying to solve. Although it helps to also have macros, which limits the list to Scheme and Lisp.
Can we really make suck a strong claim about a language on its own?
These days, syntax and semantics are all fine and groovy. For any language, you expect variables and functions and such. One huge contributor to making or breaking a language in the marketplace, though, is its library support.
CPAN, the Python standard library, java.*, boost.org,
Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
This took me by surprise, and I'm not a usual poster here, so I don't have the energy to reply to each person in turn. So I'll summarize some points I've seen:
This post is entirely misleading; we are not researchers, and we do intend to do business based on this language. However, what the language itself is is entirely mis-represented. Note: the original submitter is not affiliated with our project in any way, and in fact does not actually know or use the language.
First, we are not in a project mode of self-promotion or public representation at all. Nothing on that site claims to be a real tutorial, and the current efforts have mostly been about experimentation. We are still preparing the really usable implementation, and have a huge set of ideas and environment enhancements in backlog waiting for this. What's mentioned on the front page is actually a mere fraction of what we're working on.
The project name, "Slate", is short for "Clean Slate Smalltalk". If you don't know Smalltalk, very little of it will make sense; what's at issue is that we mean what Alan Kay would say in that Smalltalk currently means Smalltalk-80, just a certain quirky snapshot of a whole range of ideas that he and others were working on. We're interested in that whole range.
Slate is only about prototypes insofar as this was an initial language stage that was simple to play with and powerful enough to explore without too many limitations. Further revisions of the language will feature higher-level facilities for more type-safe programming and more declarative consistency (declarative in the sense of (re-)defining a class and having its instances track that consistently).
Slate's environment is about 0.001% of completion of what we intend, and we have a huge body of experience and code and ideas to draw upon which are already largely mapped-out. What you see on the site is not representative of what we want in those terms.
The syntax is definitely odd. At issue is the fact that we kept a minimal Smalltalk syntax core and optimized it for "phrase value" and added various annotation mechanisms, which wind up being very hard to understand until you crack open the 40-page programmers' manual which explains this all. Although it is no tutorial, everything is explained there, and improved with feedback from early users.
Slate is eventually going to be a full environment, and be very flexible at a large scale, so that questions of prejudice about design choices will not matter, because we actively take part in designing the system so that users can make the choices: whether image-style live interaction or C-embeddable, highly-optimized, low-overhead, no-IDE deployment. And make it so you can make these choices independently; current Smalltalks, Lisps, Dylan, and hundreds of other languages (especially the more common ones) don't have this.
There are a number of issues brought up here which are addressed but not advertised on the front page; for example, Slate will handle security at the language level, using capability analysis and the subjective programming feature mentioned. Our project has no marketting team (see Smallscript), and has actively avoided public claims until we have the demonstration at-hand. I am giving a presentation and demonstration of the next major release, featuring a self-hosting (C-friendly) setup in Seattle at Smalltalk Solutions 2004 in May.
In prototype-based languages, creation of new objects occurs by copying (cloning) existing objects. After copying, the clone is independent from the original -- changing one has no effect on the other (there is no Inheritance relationship between them).
Inheritance-style call (message) dispatch is handled through a slot named "parent" that every Object has. A call (message) that does not have an object-local slot (handler) is deferred to the objects referenced in the parent slot. In this way, objects can share the same parent and thus the same behaviour (unless locally overridden).
Note that when a clone is made, all slots in the original are copied to the clone, so the clone has the same parents as the original. Of course, after cloning, you can change any of the clone's slots independently from the original, including the "parent" slot.
Prototype languages are really not much different from class-based languages... they just split up the responsibilities a bit differently (and perhaps more uniformily).
It did a great job at bringing all the power of Lisp with all the symplicity of HTML. All the equivalents of HTML elements were just lisp-like function calls. Something like
Since all markup was just a lisp-like function call like any other, extending the company to do more complicated things - like extending the HMTL-like-markup to do real time raytracing in the browser was really easy.
Unfortunatelly the company suffers from bizzare licensing policies and can't figure out if they're selling a language or products built on the language.
JavaScript
You read right. JavaScript has a prototype based system for objects. I seldom see this mentioned in language design discussions.
Actually I like JavaScript and it's prototype system quite a lot. It's a nice and powerful little language.
But that's likely only the case because I never needed to implement any cross-browser stuff in it.
I wonder what Real computer scientists have been working on.
Lump lingered last in line for brains, and the ones she got were sorta rotten and insane.
If you are looking for a Smalltalk-like language for scripting applications without the Smalltalk GUI, check out GNU Smalltalk. It's a pretty faithful implementation of Smalltalk, and it even has a JIT.