Growing a Language
started 4/23/2004; 11:51:16 AM - last post 5/25/2004; 3:25:53 PM
|
|
Luke Gorrie - Growing a Language
4/23/2004; 11:51:16 AM (reads: 12703, responses: 36)
|
|
Growing a Language |
Journal of Higher-Order and Symbolic Computation
A little is what Guy Steele makes go a long way in this talk.
Posted to general by Luke Gorrie on 4/23/04; 11:52:56 AM
|
|
|
|
Ehud Lamm - Re: Growing a Language
4/23/2004; 12:46:30 PM (reads: 1301, responses: 0)
|
|
We really didn't mention this before? Wow.
|
|
Sjoerd Visscher - Re: Growing a Language
4/23/2004; 1:27:19 PM (reads: 1291, responses: 0)
|
|
|
Luke Gorrie - Re: Growing a Language
4/26/2004; 4:21:08 AM (reads: 901, responses: 2)
|
|
I think that to be mentioned so many times in the discussion groups (not always with a URL) was a sign it should be posted as an article.
|
|
Ehud Lamm - Re: Growing a Language
4/26/2004; 5:58:52 AM (reads: 888, responses: 1)
|
|
Sure. No problem...
Can he come up with a way to kill a language, now that Java has grown and grown and grown - to the point of suffocating everything that's good and holy?
|
|
Frank Atanassow - Re: Growing a Language
4/26/2004; 7:20:57 AM (reads: 882, responses: 0)
|
|
I had to look at the Author: field there to make sure I hadn't somehow posted that in my sleep and forgotten about it, Ehud.
|
|
Andris Birkmanis - Re: Growing a Language
4/26/2004; 7:23:06 AM (reads: 862, responses: 0)
|
|
Sun tried to do something of the sort: separating J2ME from J2SE (J2EE is not a language, but libraries).
I think the idea of introducing multiple levels of compliance is good, though the implementation isn't.
Not sure how they had to do that...
Given the amount of code written against J2SE, I don't see how to refactor J2SE into smaller pieces of compliance (multithreading, classloaders, security) without making half of Java world mighty unhappy.
Creating a major version without backward comBatAbility using Feather/Middleweight Java as a spec to implement is probably not an option as well.
|
|
Isaac Gouy - Re: Growing a Language
4/26/2004; 7:51:13 AM (reads: 857, responses: 0)
|
|
|
Luke Gorrie - Re: Growing a Language
4/26/2004; 10:24:03 AM (reads: 818, responses: 3)
|
|
Can he come up with a way to kill a language, now that Java has grown and grown and grown...?
You haven't seen Java 2.0?
(class MyButton (extends java.awt.Button)
(method (public) void buttonClick ()
(System.out.println "Goodbye, popularity!")))
Actually I had almost forgotten that Java exists. I never see any in the subset of the real world that I participate in.
|
|
Ehud Lamm - Re: Growing a Language
4/26/2004; 11:18:42 AM (reads: 807, responses: 2)
|
|
I never see any in the subset of the real world that I participate in.
I never see it, but I constantly hear about it, which I suppose is even worse.
|
|
|
I never see it, but I constantly hear about it, which I suppose is even worse.
No, no, trust me, actually using it (professionally and unavoidably) is worse. Sometimes I wonder if Java will be indirectly responsible for hastening the adoption of functional programming languages by providing a caricature of procedural OO.
|
|
Andris Birkmanis - Re: Growing a Language
4/27/2004; 1:28:07 AM (reads: 747, responses: 0)
|
|
No, no, trust me, actually using it (professionally and unavoidably) is worse.
I second that. To quote Frank, I almost thought I've written that myself :-)
Sometimes I wonder if Java will be indirectly responsible for hastening the adoption of functional programming languages by providing a caricature of procedural OO.
What are current realistic candidates for full-scale industrial adoption?
As a platform, I think Parrot, any other candidates?
As a language, I mostly don't care, as long as the platform does not dictate all the important choices to PL designers (I know this can be very costly in terms of performance, but otherwise it's another Java).
Oops, almost forgot about .NET, it looks like MS is moving much quicker than Sun. Is it just me? Can anybody using .NET comment on what are the current .NET limitations, and whether there is a plan to cure them?
BTW, are there any problems backing Oz by Parrot? Or is it done already? :-)
Probably Peter can comment on what is the long-term plan for Oz' platform (sorry if I missed other Oz/Mozart guys on LtU)?
|
|
Frank Atanassow - Re: Growing a Language
4/27/2004; 2:16:42 AM (reads: 720, responses: 7)
|
|
Andris: What are current realistic candidates for full-scale industrial adoption?
Objective Caml is, I think, the only one, but I doubt it will happen. Instead it will be a newer language, which is novel enough to draw people's attention and get a front-page Slashdot posting. (No, not Arrow. :)
|
|
Ehud Lamm - Re: Growing a Language
4/27/2004; 2:35:52 AM (reads: 730, responses: 6)
|
|
Both Java and C# show that with enough commercial backing it is possible to significantly influence the direction of the PL market.
This is A Good Thing since it means that a revolution is possible, but it also means that it is very hard to predict what will happen, beacuse it depends on who is going to champion the new language, and what it will look like.
Are the research variants on C# a reason for hope? I am not sure the answer is a straight out "no."
|
|
Andris Birkmanis - Re: Growing a Language
4/27/2004; 4:04:21 AM (reads: 728, responses: 1)
|
|
There are dozens of research variants of Java.
The problem is, almost all of them require either extensive preprocessing or changes to VM, if not both.
IMHO, Java (mostly VM, but the language as well) was not designed to be a growing language, and despite my respect to Guy Steele, I don't think it will ever lose its warts.
To back this statement, several warts I don't think can be cured (most of them apply not only to Java):
1. No first-class continuations and no easy way to introduce them.
I know this can be _very_ expensive if done improperly, but judging by Parrot, performance lost may be acceptable. Not sure this can be implemented in a way that completely removes costs from the code not using this feature, though. But, yes, I believe first-class continuations are required for general purpose PL (GPPL).
2. Overly complicated language for the covered feature set.
It bothers me not only because of cognitive strain, but also because it makes lives of metaprogramming for the language much harder (and I definitely need metaprogramming). I don't even hope for simplicity of Scheme, but I believe GPPLs do need simple model that can be augmented by DSLs by any user of the language.
3. Basic features like classloading done in incredibly convoluted ways, described without sufficient rigor.
The protocol of NoClassDefFoundError/ClassNotFoundException is undocumented, the overall process is described in the legalese prose, making it almost impossible (for me, at least) to reason about it. This one could be cured by adopting formal methods, but because of 2. it looks practically impossible.
Well, it almost look like hate-mail :-)
Also, after re-reading all this it almost looks that Scheme is the language to bind them all ;-)
What does Scheme lack to make it the mainstream sequential language?
Static typing? Concrete syntax? VM?
Huge libraries?
|
|
Isaac Gouy - Re: Growing a Language
4/27/2004; 1:33:43 PM (reads: 679, responses: 0)
|
|
What does Scheme lack to make it...
Opportunistic promotion. Java's promoters seized their moment.
(Trite must be my word of the day.)
|
|
Kragen Sitaker - Re: Growing a Language
4/28/2004; 8:25:43 PM (reads: 606, responses: 0)
|
|
I'm not sure why I don't hack everything in Scheme. A few years ago, I could plead that the lack of libraries stopped me, but with the PLT folks' efforts, I don't think I can make that excuse anymore. Maybe I should take some time to whack it around a bit.
I guess it's about time I mastered a new language; I think it's been a year or two since the last one. OCaml, Scheme, Erlang, Smalltalk, and Java are the leading candidates; Java primarily because of Eclipse and the libraries.
|
|
Paul Snively - Re: Growing a Language
4/29/2004; 10:49:39 AM (reads: 572, responses: 1)
|
|
Kragen Sitaker: I guess it's about time I mastered a new language; I think it's been a year or two since the last one. OCaml, Scheme, Erlang, Smalltalk, and Java are the leading candidates; Java primarily because of Eclipse and the libraries.
Let me also suggest Oz, supported by Concepts, Techniques, and Models of Computer Programming. If you pursue this course, you'll learn everything that you would have learned by learning O'Caml, Scheme, Erlang, Smalltalk, or Java, and more. And lest you think that the parallels won't be explicit, let me point out that the text draws explicit parallels to Haskell (similar to O'Caml), Erlang, Java, and Prolog. In short, this is a Masters in Computer Science in one language and text.
Having said that, I like O'Caml a lot. In fact, I just spent last weekend bouncing among Common Lisp, O'Caml, and Oz, all of which support interactive development nicely integrated with the EMACS editor. Any of these tools is a joy to work with for that reason if no other, but each has unique benefits: Lisp is uniquely good at loading new code into a running image, so I recommended to a friend that he learn it to write web apps that could be updated without taking down the server. O'Caml uniquely has a toploop, a bytecode compiler, and a native compiler that can generate standalone binaries with reasonable disk and RAM footprints, so I'm thinking of doing robotics with it. Oz uniquely addresses multiple programming concepts, including cheap concurrency and distribution, so I'm thinking of writing an MMORPG with it.
But what these all have in common is their support of an excellent interactive, incremental development system in EMACS. That's an often-undersold benefit of these alternative languages, IMHO.
|
|
Isaac Gouy - Re: Growing a Language
4/29/2004; 12:52:14 PM (reads: 549, responses: 0)
|
|
Lisp is uniquely good at loading new code into a running image
Don't Smalltalk and Erlang play there too?
|
|
Paul Snively - Re: Growing a Language
4/29/2004; 4:44:31 PM (reads: 539, responses: 0)
|
|
Isaac Gouy quoting me:: Lisp is uniquely good at loading new code into a running image
Isaac: Don't Smalltalk and Erlang play there too?
Yes, sorry; I meant "uniquely within this trio I've enumerated." I was trying to describe some contrasts among them while observing that they all support incremental, interactive development.
|
|
Peter Van Roy - Re: Growing a Language
4/30/2004; 12:07:08 AM (reads: 516, responses: 0)
|
|
Lisp is uniquely good at loading new code into a running image
Actually, Oz has no problem with this either, either as compiled code
(software components, a.k.a. functors, are values in the language, and
so are classes) or as source (with the first-class compiler).
|
|
Paul Snively - Re: Growing a Language
4/30/2004; 8:05:28 AM (reads: 499, responses: 0)
|
|
Peter Van Roy: Actually, Oz has no problem with this either, either as compiled code (software components, a.k.a. functors, are values in the language, and so are classes) or as source (with the first-class compiler).
That's true; I had forgotten about functors. Hmmm. Has anyone written a web server in Oz? Ah, I see that they have; it's just named oddly: <http://www.mozart-oz.org/mogul/doc/mathweb/httpd>. I might have to change my recommendation to my friend; I can very easily imagine developing a distributed web app in Oz now.
|
|
bitwize - Re: Growing a Language
4/30/2004; 6:30:48 PM (reads: 475, responses: 0)
|
|
|
Kragen Sitaker - Re: Growing a Language
5/3/2004; 9:45:05 PM (reads: 439, responses: 0)
|
|
Thanks for the advice!
Oz sounds pretty interesting, especially from a Grand Unified Theory of Programming standpoint; but I have the impression, justified or otherwise, that these other languages are a lot more pragmatic. Python is currently my favorite language.
|
|
Paul Snively - Re: Growing a Language
5/11/2004; 11:12:26 AM (reads: 351, responses: 0)
|
|
Kragen Sitaker: Thanks for the advice!
Hey, as people here have no doubt noted, I'm pretty free with my opinions. Nevertheless, you're welcome.
Kragen: Oz sounds pretty interesting, especially from a Grand Unified Theory of Programming standpoint; but I have the impression, justified or otherwise, that these other languages are a lot more pragmatic. Python is currently my favorite language.
Python is a very good pragmatic choice along several dimensions: it offers a very nice combination of imperative, object-oriented, and some functional constructs. It has an impressive collection of libraries, and perhaps most significantly, it has a very sizable community. IMHO, Python's weaknesses are that its paradigms aren't especially well integrated—it has non-orthogonalities that bug me a lot—it's a relatively poor runtime performer; and it seems difficult to deliver stand-alone end-user software with it. I don't think any of these are insurmountable: each revision of the language seems like a real improvement; Parrot may help performance, although some of Python's heavily dynamic features will make this a challenge regardless; and some packager for the Parrot runtime + Python code for popular platforms will likely address the last point.
My sense is that by contrast, O'Caml has all of the benefits of Python except quite so large a collection of libraries and community, and none of the shortcomings. I think this is quite significant: I can imagine developing and selling O'Caml software professionally in a way that I can't (yet) imagine for Python. O'Caml is the language that I believe could replace C/C++, today.
As for Oz, I think of it as the best extant integration of all of the programming paradigms known today, with a very powerful development environment, performance certainly on par with Python, and a very small, but focused, community. With the publication of the CTM, I can only see the collection of libraries, and its associated community, growing over time. With Oz's support for easy concurrency and distributed processing, I can also see it targeting much more complex applications than other languages. That really leaves the question of native code and standalone packaging, and here I see it having exactly the same issues, today, as Python.
So perhaps I have a different definition of "pragmatism" than many people, because I see O'Caml as being as pragmatic modulo libraries/community as C/C++, and Oz as being as pragmatic modulo libraries/community as Python. So I suspect that when many people (you may or may not be one of them) say "pragmatic," what they mean is "what everyone else is using," and my thesis is that "what everyone else is using" is given far too much weight (again, not necessarily by you).
|
|
Mark Evans - Re: Growing a Language
5/13/2004; 7:06:38 PM (reads: 299, responses: 0)
|
|
Paul, since you like Oz and OCaml, consider Alice ML, an ML-based version of Oz which maintains compatibility. It was previously discussed. The major difference from Oz is static typing.
|
|
Ziv Caspi - Re: Growing a Language
5/14/2004; 10:45:11 AM (reads: 283, responses: 3)
|
|
Ehud: Both Java and C# show that with enough commercial backing it is possible to significantly influence the direction of the PL market.
One hears this claim quite often. What evidence are there that the popularity of Java/C# is actually marketing-based?
|
|
Ehud Lamm - Re: Growing a Language
5/16/2004; 12:46:05 PM (reads: 248, responses: 2)
|
|
Let me turn the tables on you...
How can one study the causes behind language popularity? Shouldn't the fact that at least four of the most widely used programming languages had either marketing support or OS support count as evidence for something? (I am thinking C, VB, Java and C#, but feel free to add more languages to this list.)
|
|
Marius Amado Alves - Re: Growing a Language
5/23/2004; 5:59:52 PM (reads: 174, responses: 2)
|
|
About the success of C, I agree with Stepanov, that it was because "it is the best representation of an abstract computer that we have." (www.sgi.com/tech/stl/drdobbs-interview.html) And it seems highly probable that the success of C determines in great part the success of C derivatives (including C++, Java, C#)--even when these languages depart from the pure machine model e.g. by being object-oriented.
Of course for non C-descendant successful languages (FORTRAN, COBOL, VB...), the reasons for their success must lie elsewhere.
Anyway, these observations would certainly be my starting point for a "study of the causes behind language popularity"... if I ever were to carry out one.
|
|
Ehud Lamm - Re: Growing a Language
5/24/2004; 12:50:31 PM (reads: 161, responses: 1)
|
|
About the success of C, I agree with Stepanov, that it was because "it is the best representation of an abstract computer that we have." (www.sgi.com/tech/stl/drdobbs-interview.html) And it seems highly probable that the success of C determines in great part the success of C derivatives (including C++, Java, C#)--even when these languages depart from the pure machine model e.g. by being object-oriented.
I am not sure I agree with phrase "best representation," but I agree with the gist of this argument.
Another factor is that popularity of a language implies support being available in the future, and this causes positive feedback. See Andrew's pertinent question regarding the longevity of Oz.
|
|
andrew cooke - Re: Growing a Language
5/24/2004; 2:18:35 PM (reads: 157, responses: 0)
|
|
don't forget the rise of unix - that made c the default language in many places. when i was working on vaxen, i knew no-one who used c (maybe this is nonsense - was vms implemented with c?) (googling to try and answer that, i found this - http://www.ultimate.com/phil/lil/ )
|
|
Ziv Caspi - Re: Growing a Language
5/25/2004; 11:29:44 AM (reads: 125, responses: 1)
|
|
Ehud: Let me turn the tables on you...
Of the languages you mention, I think C sets the most striking example. C was developed more-or-less in parallel with Unix, and each probably owns at least some of its success to the other, but it has never enjoyed a mass-marketing push such as Java's or C#'s, and still managed to outdo all its competitors.
It in interesting to note that while in the Unix world C had a considerable edge (because the OS was written in it), in the PC world it started out as just one language out of many. In fact, during the first half of the 80's it certainly looked liked the future was Pascal's (remember Turbo Pascal 3.0?)
(IIRC, Microsoft had three compilers made during the early 80's -- Fortran, Prolog, and C; guess who won :-) Personally, I agree with Stepanov (mentioned by Marius Amado Alves) that C's advantage was that it closely resembled the machines it run on, so much so that ordinary people like myself can have a look at a compiler's optimized output and still understand how it maps to the source code (or the other way around).
Perl, Python, and PHP seem to be doing quite well in their "target" areas with no apparent commercial backing, so I would say commercial support isn't necessary in today's world for PL to succeed. The question is whether commercial backing is necessary.
I'll now turn the tables back: is it possible that the "commercial" languages (VB, Java, C#) gained popularity because they were created to provide programmers what they wanted rather than what someone thought they needed?
VB (and Delphi) were created when writing Windows GUI applications was extremely laborious, and both succeeded in reducing this load. Java was created when time-to-market and server-side programming were important, making for the first time garbage collection something the masses would use, simply because manual memory tracking is too difficult for most. (I know mid-90's Java was intended to win the client side, but it never did that, probably because its UI libraries weren't good enough.)
|
|
Ehud Lamm - Re: Growing a Language
5/25/2004; 3:02:35 PM (reads: 118, responses: 0)
|
|
I'll now turn the tables back: is it possible that the "commercial" languages (VB, Java, C#) gained popularity because they were created to provide programmers what they wanted rather than what someone thought they needed?
I don't think this is the real cause. I know it is a popular explanation (cf. such terms as "bondage & discipline languages") but I think the dynamics are different.
Take .Net as an example (or C & Unix, PL/I & MVS etc.). People wanting to exploit .Net and future OS services from Microsoft are likely to choose either C# or VB.Net. Why? Because Microsoft decided to invest a lot of effort making these the natural choices. So you might say "someone thought the programmers need C#". The other persepctive, i.e. that users use C# because it gives them what they want is equally valid. It's just that C# does this, beacuse someone wanted it to...
A slightly more subtle question is why Microsoft (and others before it) decided to create their own language in this case rather than continue with the previous strategy of providing libraries for C++ or another mainstream language. I think the answer to this question is more enlightening.
One common explanation is that this is simply a way to crush Java. I don't think this is the full story.
Another reason, specific to this case, would be the move to managed code. This is an important factor in the move to CLR and associated languages. But, again, I don't think this is the full story.
Providing a language gives us a very powerful method to influence software construction, control programmer behaviour, and help produce the kinds of software we are interested in (via APIs, compile time analysis and run time support). Likewise, whenever an OS or even an application provider provides a programming language with added support, this will influence programmer behaviour (think VBA; think Javascript; think Guile). There is, yet again, positive feedback.
So it's not just giving programmers what you think they need, it's really about providing some kind of value. But that does not mean that any language that provides useful functionality, APIs etc. is the best tool for each and every software project. It is thus important to distinguish between general purpose languages, and languages used in more restricted domains.
Obviously the dynamics I desrcibed above aren't the only mechanism involved, but it's one of them.
|
|
Marius Amado Alves - Re: Growing a Language
5/25/2004; 3:25:53 PM (reads: 112, responses: 0)
|
|
"Personally, I agree with Stepanov (mentioned by Marius Amado Alves) that C's advantage was that it closely resembled the machines it run on, so much so that ordinary people like myself can have a look at a compiler's optimized output and still understand how it maps to the source code (or the other way around)."
The C-to-machine perfect match is there in the source, *without* looking at compiler output. I recall using K&R as my C tutorial and learning computer architecture for free along the way.
|
|
|
|