[ocaml-biz] what slow OCaml is worth (was: (GC issues) Alternative Bytecodes for OCaml)
Brian Hurt
bhurt
Sun Aug 29 20:57:53 PDT 2004
On Sun, 29 Aug 2004, Brandon J. Van Every wrote:
> This came from an argument on caml-list about what OCaml would be worth,
> if it were 3 to 10 times slower than it is now.
Signifigantly less, IMHO. One of the advantages Ocaml has in the pitches
I've made is that you get this whole set of features without sacrificing
performance.
> Yes, there are other ways OCaml could distinguish itself in the
> marketplace besides performance. But, OCaml has other weaknesses, which
> is why I say Python would easily beat it if performance was equally bad.
> OCaml:
>
> - is baroque and difficult to learn compared to Python
Only if you're comming from imperitive/OO languages. Learning a new
language in a paradigm you're already familiar with is easier than
learning a new paradigm.
> - does not have quite as good a license for creating language dialects,
> as Python
I'm not going to get into a license debate with you. Note that licensing
problems hasn't much limited the number of Ocaml language dialects-
Jocaml, G'caml, Meta-ocaml, Acute, etc.
> - is industrially proven in fewer problem domains than Python
> - doesn't have the library support of Python
> - is not as well packaged for ready consumption as Python
> - does not have as many books available as Python
> - is in the "What's that?" stage. Tons of people know about Python.
>
> The good news is that only problems 1 and 2 are insoluable.
Only problems one and two are not functions of popularity. Note that
there was a time, not so long ago, Python didn't have those things. And a
time when C++ didn't have those things. And when C didn't have those
things. And when Fortran didn't have those things.
Some things Ocaml has that Python doesn have:
- Strong, static, type checking. Find the bugs in the code when
compiling, and even find bugs in code that almost never gets executed.
- Type inference and an expressive type system to make the strong, static
type checking not a deep annoyance. The ability to express types like
string list or (int, string * float) hashtbl.t list array simply and
cleanly, and not having to express them most of the time.
- Immutability the default. Java programmers are slowly learning why this
is an advantage.
- Choice of how to execute the resultant code- interpreted, virtual
machine, and compiled to native. All of these have advantages and
disadvantages, even ignoring performance. For example, I can distribute a
native application to customers and they don't need Ocaml installed to run
it.
I don't see Python having a serious edge over Java in the language
department. What big thing can Python do that Java can't? Other than
pass the ideological litmus test, that is. You're right, the field of
Imperitive, Object Oriented languages is crowded. This is as much a
disadvantage as an advantage.
> > I've had this argument with you before on freeciv-dev, and
> > want to just
> > reiterate this here: in my book, a language doesn't succeed or fail
> > based on how well it does in "the marketplace".
>
> Then what's your metric of success? Personal anecdote?
There are multiple different meanings of success. I would already
consider Ocaml a technical success. The language and the compiler exist,
are high quality, and are very usefull IMHO. As a marketing success,
Ocaml could still use a little work :-).
> Python is going places. To compare OCaml's 'success' to Python's
> success is quite a bit of patting oneself on the back prematurely. And
> it should be remembered that Python's 'success' is a 2% marketshare.
> Since it's actually trying to compete head to head with Java, C#, and
> Perl, that's not exactly good. They've not really succeeded in their
> own terms yet. They might get there in the next few years, they might
> not. The Python community is still just a bunch of techies, and is
> certainly capable of failing at "the will to market."
One of the advantages Python had, and Perl had before it, was that they
were scripting languages. The projects that use scripting languages tend
to be small- few lines of code (<3 man months of word) and a small number
of developers (generally one). Often we're talking about things hacked
out in an afternoon by one guy. Not things your manager really cares
about all that much. And not that much risk- the worth that could happen
is that you waste an afternoon. Even if the programmers bothered to
inform the manager, the manager wouldn't care. Sure, go ahead, use that
weird language I've never heard of. If you get hit by a truck, your
replacement will simply throw it out and rewrite it some other weird
language I've never heard of.
This particular market is more "permable" than other markets for
programming languages, in that it's more ameneable to experimentation with
new languages. This makes it easier for a new scripting language to gain
acceptance. It worked for that afternoon's project, try it on a project
that'll take a day or two. Then on a week long project. Then on a month
long project. Etc. On a project that'd take half a dozen people many
months to complete, the politics change dramatically. Which is why not
just Perl and Python, but also Ruby and Lua, have dramatically higher
popularities than Ocaml.
> You seem to be equating 'success' with having a 0.1% marketshare niche.
> I do not accept that definition of 'success'. That is failure. A
> general purpose language should have general utility and compelling
> value to people, much more than 0.1% of the people. It has been argued
> by some language pundits that bad languages do in fact die, and that
> this is how it should be.
We can't get 0.2% of the population without getting 0.1% of the
population. We can't get 10% market share without first getting 1% market
share.
The question is- does Ocaml peak at 0.1% (or less) market share, or does
it go on, passing 0.2%, 1%, even 10% market share?
> The success of Lisp is highly debateable. In fact, the stereotype is a
> crumudgeony old Lisp fart sitting around grousing about how everyone's
> an idiot because they don't use Lisp. They think Lisp 'should by
> rights' have taken over the world, and it didn't. Which means, pretty
> clearly, they missed something about how the world works. Insightful
> Lisp guys have remarked that Lisp could still be popularized, if they
> were willing to call it something other than Lisp. As it stands, the
> Lisp brand identity is dead.
Lisp was, by many rights, highly successfull and popular. 25 years ago.
--
"Usenet is like a herd of performing elephants with diarrhea -- massive,
difficult to redirect, awe-inspiring, entertaining, and a source of
mind-boggling amounts of excrement when you least expect it."
- Gene Spafford
Brian
More information about the Ocaml-biz
mailing list