How did Ruby and Python prevent fragmentation while ML and Lisp did not?
programmers.stackexchange.com
programmers.stackexchange.com
I don't think Ruby should be compared to ML. I think Ruby should be comared to OCaml. ML, if it gets compared against anything, should be compared against the category that includes Python, Ruby, Perl, and JavaScript. This category is about as fragmented as Lisp.
The problem with this new category is it doesn't have a simple, clear definition. Lisp is pretty much defined by S-expressions, and MLs by their type systems. This new family might be defined by their common approach to object systems (i.e. objects as dicts), although that's really more representative than fundamental.
[1] I'm under the vague impression that Common Lisp and SML are somewhat more fragmented than other members. I wonder if this correlates to their being the "Common"/"Standard" dialects.
Clojure is not fragmented, but both Scheme and Common Lisp are extremely fragmented. Scheme is probably one of the most fragmented language there is, there are literally dozens of implementations of it with various levels of compatibility[0], and it's actually gotten worse lately as many (if not most) implementations refused to migrate to R6RS and remained on R5RS instead. There are even implementations (e.g. DrRacket, formerly DrScheme) which forked/opted out the whole language.
[0] http://en.wikipedia.org/wiki/Category:Scheme_implementations
Scheme is widely (mostly?) used as a teaching and research language in Comp. Sci. schools. This sort of environment encourages experimentation with the language itself, whereas Python and Ruby are more oriented towards practitioners who are more interested in using the language as-is, not experimenting with it.
CL is defined by a standard which most of the implementations work pretty hard to adhere to. Of course, most of them have their own extensions, but a lot of these (particularly in the important areas of multithreading and foreign function calling) are now abstracted by portable libraries. This is a very different situation from the Scheme world.
That definitely isn't what I wrote.
> There are even implementations (e.g. DrRacket, formerly DrScheme) which forked/opted out the whole language.
This is reflected by the name change.
For example, you can say that ML fragmented into SML and OCAML, but then what's Haskell? Is it a fragment of SML? Well, not really. But then, SML and OCAML are significantly different languages, which have taken their inspiration from sources outside of their "parent language" as well.
On top of this, look at, for example. Boo. Boo is a lot like Python, but is it a fragment of Python? Also, C, C++, C#, Java, now even Go.
I think the point of this is what is the point at which a new language becomes no longer a "fragment" of its parent, and becomes a new language in its own right?
or maybe I'm wrong :)
I think it got mainstream after the RubyOnRails Wave that made a lot of (mainstream) programmers (that only use what other use and/or is popular) accept dynamic languages. And when BackSlash came (Ruby is Slow, RoR is full of Magic) python w/ django was the dynamic lang that clinged on shore. Not accidentaly since it already had pretty clean core and a lot of libraries (it always had more libs than ruby). Now everybody uses it.
If you look at the similar languages w/ a lot of libraries and bindings php/Perl/Ruby/Python it's not weird that it's popular and I would say that it is the simplest/cleanest.
Which ones did you mean as simpler?
You should remember there's a lot of Python usage besides web, like in the scientific community.
I back then used it for a lot of things and most weren't related to web. But I think it made the biggest jump after Ruby backslash. From quick peek at TIOBE:
""" "Programming Language of the Year" award winners is shown below. The award is given to the programming language that has the highest rise in ratings in a year. """
2007 Python 2006 Ruby 2005 Java
Most of the code that gets written in Python has nothing to do with web development. Web development is just high-profile.
But as I also said, Python had a lot of libraries back then 10 years ago when I used it with Zope, WxWidgets, PyGame, CherryPy, ...
And in last paragraph I try to say exactly what you said in relation to Perl and other languages of this kind.
In the case of Python, there are such dictators. With Ruby, it was less the dictator and more the dictates of a poorly defined language specification. "The spec is this running C code" is thought by many to be a smell. (Also said for VP8.) In the case of Ruby, multiple groups of several people each worked for long stretches of time (half a year or more) to come up with parsers and non MRI specifications for Ruby syntax.
Conversely, one can implement Lisp or Smalltalk syntax quite quickly, which means the barrier to fragmentation is pretty small. Python is still fairly small. I think that there would be more fragmentation without its benevolent dictator.
As far as Common lisp and Scheme go, there are things outside the rnrs and common lisp standards that cause the fragmentation.
I don't use common lisp so I can be wrong but going by the specs, there is no mention of threading, networking et al.
http://www.lispworks.com/documentation/HyperSpec/Front/Conte...
Without that, sbcl and clisp aren't as inter changeable as they should be and this can be regarded as fragmentation.
Widespread internet access, along with the tremendous utility that the internet holds for developers, strongly encourages the concept of a canonical implementation of a language, in a way that simply didn't seem nearly so important 20+ years ago.
(It's also interesting that the internet encourages this notion of canonical implementation even while simultaneously encouraging the creation of forks.)
Scheme seems fragmented because a lot of research work use it as the primary tool. For example, you have languages like Larceny which were primarily designed to study Garbage collections or even probabilistic language models using Church Scheme.
The ease in which Lisp and Scheme allows you to create new languages and perform exploratory work has spawned a lot of newer implementations.
And People also come up with newer implementations for a specific goal in mind. For example, Bigloo Scheme was created in order to enable Scheme programming style where C(++) is usually required.
Ruby, perl, python, C, etc are tools for most people. People who do use them as study object will improve them by inventing a new language, rather than by tweaking them and still calling them by their original name. The main reason for that, I think, is that it is about as easy to implement a new language as it is to tweak those languages.
Ruby and Python (and Perl, etc.) are languages for pragmatists. Their user communities are overwhelmingly dominated by folks who've got a practical problem to solve, and primarily see the language as a tool to help solve that problem. They also tend to be rather "CISC"-y, which makes trying to customize them less attractive because complicated things are harder (and often less fun) to tinker with.
Lisp and ML (and Forth, etc.) are languages for language geeks. They might see a lot of practical use, but they're also popular as a solid working base from which to experiment with new language ideas. And they benefit from being fairly small and orthogonal. Most fans of languages in this camp have written their own implementation of their language of choice - partially out of being a language geek, and partially because their specs are clean enough that doing so isn't a very intimidating prospect.
You could say that both Python and Ruby are instances of Lisp's fragmentation, rather than unfragmented alternatives. (I am not a Lisp programmer, BTW.)
Python and Ruby both don't have that. They are alternatives to Lisp, and in the same family of dynamically typed programming languages, but they are not "instances of Lisp's fragmentation" in any way: nobody took a Lisp-like language and from that created Python.
Do you have some citation about how he left implementation of syntax as an exercise? I'd be interested to see that.
Python and Ruby have first class functions, garbage collection, dynamic typing, and many other advanced dynamic features, so there is definitely a similarity between them and Lisp. However, the fact that they don't have code as a first class object is definitely a major limitation. In Lisp essentially everything is first class and manipulable at run time.
ML I know nothing about, BTW.
There's an element of truth in that, but only in the same sense that all Turing complete programming languages are equivalent or that many programming languages are ultimately instantiations of a register machine, a memory store, and a program counter. The interesting thing in most cases is what you build on top of that foundation.
With Lisps, the value is in the uniformity. That makes it very easy to extend the basic functionality you get out of the box in a way that fits in, using macros and so on.
With various other languages, the value is in the pre-built tools that rest on top of some underlying abstract syntax tree. That covers a vast range of functionality these days: more expressive type systems, a wider range of built-in data structures, actor-based concurrency, low-level memory and port access, and numerous other practically useful language features. Hopefully any given language offers a combination of features that work well together and have natural supporting syntax and semantics. That in turn gives each language its own flavour and means each language works better for some types of software than others, even if ultimately it's usually just syntactic sugar for a relatively simple execution model and an AST.
McCarthy's Lisp:{Python,Ruby}::zygote:adult human
mtts as quoted by Silhouette gets it right IMO. Conversely, S's distinction between extending a language and using the tools (the distinction, to oversimplify, that makes you a Lisp programmer) that sit on top of its core seems to me a confusion of means with ends. Any useful program is a fall from the perfection of JM's insight. This perspective makes me a not-Lisp-programmer. Thousands of developers smarter and more experienced than I have taken each side of this dispute without resolving it; I certainly don't hope to.Lisps allow you to extend both the parser (reader macros) and do transformations on the syntax tree (macros) before it gets compiled/interpreted. In most of the other languages parsing and code generation are very tightly coupled with no easily accessible step in between.
What is important in the read-eval-print loop is the dashes :)
Yes.
* they encourage competition, which leads to better implementations
* they help the language reach new niches (e.g. on the web; in embedded systems; ...)
* they encourage language standardization, which reduces risk to users.
No
* they dilute community effort -- only so many people can write good compilers and runtimes
* they can lead to fragmentation and incompatible code as languages diverge, increasing risk to the success of the language overall.
* they confuse users, further hurting adoption. Particularly beginners have trouble knowing which implementation is a good choice.