From: Arne Vajhøj on
On 16-07-2010 10:17, ClassCastException wrote:
> On Mon, 12 Jul 2010 21:56:48 -0400, Arne Vajhøj wrote:
>> On 10-07-2010 02:27, ClassCastException wrote:
>>> On Fri, 09 Jul 2010 21:57:23 -0400, Arne Vajhøj wrote:
>>>> If Java get 20 years as "it" and 20 years as "legacy", then that would
>>>> actually be more than OK.
>>>>
>>>> Things evolve and sometimes it is better to start with a blank sheet
>>>> of paper.
>>>>
>>>> 64 bit array indexes, functions as first class type, bigint and
>>>> bigdecimal as language types etc..
>>>
>>> Clojure has all of this already except 64 bit array indexes and runs on
>>> the JVM.
>>>
>>> Clojure doesn't even have arrays, though,
>>
>> I don't think Clojure has what it takes to become a mainstream language.
>
> Why?

The syntax has had 50 years to become popular without making it.

It does not seem likely that it will now.

Arne
From: ClassCastException on
On Wed, 28 Jul 2010 22:19:09 -0400, Arne Vajhøj wrote:

> On 16-07-2010 10:17, ClassCastException wrote:
>> On Mon, 12 Jul 2010 21:56:48 -0400, Arne Vajhøj wrote:
>>> I don't think Clojure has what it takes to become a mainstream
>>> language.
>>
>> Why?
>
> The syntax has had 50 years to become popular without making it.

Er, Clojure's only been around for maybe 5 years, tops; I think rather
less than that.

If you mean Lisp syntax in general, Clojure has a bunch of improvements/
differences over older Lisps there, which may be enough to make a
difference. And its assets in other areas (compiles to fast, widely
portable bytecode, transactional memory/other concurrency features, FP
benefits, macros, incremental development and testing at a REPL) could
outweigh syntax issues.

Keep in mind that older Lisp environments mostly required, if not
specialized hardware, then at least rather esoteric software. Proprietary
virtual machines/interpreters, poor library/OS support, emacs, etc. The
typical Lisp environment of yore was totally unsuited to developing
desktop apps or much else than command-line tools, command-line
curiosities, and CS research papers. :-)

Clojure on the other hand can a) generate decent desktop apps and b)
generate decent web apps, one a traditionally important area and the
other a huge current growth area. It can be used in applets (in the
browser's JVM) and server-side (and there are already Rails-like
frameworks based on it -- Rails will be its main competition there, in
fact).

Oh, and some people LIKE the syntax. It's very simple and regular. The
people that run screaming from perl (it's line noise, I tell you! LINE
NOISE!) and find Java verbose (how many f*@!ing times must I repeat
"WeakIdentityHashMap<String,Foobar>" on this one line??? ARRRRGH) could
easily grow to love Clojure's syntax.

Really, though, having a REPL is *alone* a major feature that I miss
badly when developing in Java and similar languages. Testing Java code is
*painful*: you write a short method to do X and then you either write
version 0.1 of the program with many unimplemented features but the full
core functionality before first running any of it and ARGH! Why that f&#!
ing NPE? How the #&%! can THIS possibly be null! AAAAAGH! or you have to
spend more time writing test boilerplate than writing the actual program
(and half of THAT is boilerplate, too). A three line method to do some
iteration over an ArrayList generating a total of some sort? Ten lines of
test case, including boilerplate, setup, teardown, etc. etc. etc., plus a
couple of lines that actually call the method being tested. In a language
with a REPL? Three lines of method and then two lines at the REPL, one to
create a sample list to use as test input and one to run the method.
Maybe another one to run the method on an empty-list literal or whatever
to check the obvious corner case. Find a bug? Edit the method, recompile,
rerun the last two commands at that REPL.

Oh, and in Clojure, summing over a list becomes a one-liner: (reduce + 0
the-list). There's a kind of while loop in Clojure but you almost never
need it because it's often much, MUCH easier to express what you're doing
in terms of mapping and reducing operations over sequences of some sort,
and even then that while loop's only there because JVMs as a rule don't
do tail call optimization.

> It does not seem likely that it will now.

They said that about 3D movies after almost exactly 50 years had elapsed
since the previous round of experiments in 3D cinematography flopped
horribly. Then James Cameron's big 3D FXtravaganza turned into a box-
office juggernaut. Who's laughing now?
From: Lew on
ClassCastException wrote:
> Testing Java code is
> *painful*: you write a short method to do X and then you either write
> version 0.1 of the program with many unimplemented features but the full
> core functionality before first running any of it and ARGH! Why that f&#!
> ing NPE? How the #&%! can THIS possibly be null! AAAAAGH! or you have to
> spend more time writing test boilerplate than writing the actual program
> (and half of THAT is boilerplate, too). A three line method to do some
> iteration over an ArrayList generating a total of some sort? Ten lines of
> test case, including boilerplate, setup, teardown, etc. etc. etc., plus a
> couple of lines that actually call the method being tested.

Nonsense. Nice hyperbole, though.

For one thing, NPE is a programmer error, nearly always easily preventable.
And it takes but a moment to realize how the freak it can be null. So either
you're exaggerating or you're not so very good at Java programming and
shouldn't be drawing comparisons about languages you don't know so well.

So AAAAAGHH! stop trying to start a Language War.

--
Lew
From: Arne Vajhøj on
On 28-07-2010 23:09, ClassCastException wrote:
> On Wed, 28 Jul 2010 22:19:09 -0400, Arne Vajhøj wrote:
>
>> On 16-07-2010 10:17, ClassCastException wrote:
>>> On Mon, 12 Jul 2010 21:56:48 -0400, Arne Vajhøj wrote:
>>>> I don't think Clojure has what it takes to become a mainstream
>>>> language.
>>>
>>> Why?
>>
>> The syntax has had 50 years to become popular without making it.
>
> Er, Clojure's only been around for maybe 5 years, tops; I think rather
> less than that.
>
> If you mean Lisp syntax in general, Clojure has a bunch of improvements/
> differences over older Lisps there, which may be enough to make a
> difference. And its assets in other areas (compiles to fast, widely
> portable bytecode, transactional memory/other concurrency features, FP
> benefits, macros, incremental development and testing at a REPL) could
> outweigh syntax issues.
>
> Keep in mind that older Lisp environments mostly required, if not
> specialized hardware, then at least rather esoteric software. Proprietary
> virtual machines/interpreters, poor library/OS support, emacs, etc. The
> typical Lisp environment of yore was totally unsuited to developing
> desktop apps or much else than command-line tools, command-line
> curiosities, and CS research papers. :-)
>
> Clojure on the other hand can a) generate decent desktop apps and b)
> generate decent web apps, one a traditionally important area and the
> other a huge current growth area. It can be used in applets (in the
> browser's JVM) and server-side (and there are already Rails-like
> frameworks based on it -- Rails will be its main competition there, in
> fact).

Unless these features are tied to the syntax, then people will prefer
a language with those features and a more standard syntax.

> Oh, and some people LIKE the syntax.

Sure. But not enough to make the language a success.

>> It does not seem likely that it will now.
>
> They said that about 3D movies after almost exactly 50 years had elapsed
> since the previous round of experiments in 3D cinematography flopped
> horribly. Then James Cameron's big 3D FXtravaganza turned into a box-
> office juggernaut. Who's laughing now?

Probably James Cameron.

But that is not particular relevant for the topic.

Arne

From: ClassCastException on
On Thu, 29 Jul 2010 00:36:13 -0400, Lew wrote:

> ClassCastException wrote:
>> Testing Java code is
>> *painful*: you write a short method to do X and then you either write
>> version 0.1 of the program with many unimplemented features but the
>> full core functionality before first running any of it and ARGH! Why
>> that f&#! ing NPE? How the #&%! can THIS possibly be null! AAAAAGH! or
>> you have to spend more time writing test boilerplate than writing the
>> actual program (and half of THAT is boilerplate, too). A three line
>> method to do some iteration over an ArrayList generating a total of
>> some sort? Ten lines of test case, including boilerplate, setup,
>> teardown, etc. etc. etc., plus a couple of lines that actually call the
>> method being tested.
>
> Nonsense. Nice hyperbole, though.
>
> For one thing, NPE is a programmer error, nearly always easily
> preventable. And it takes but a moment to realize how the freak it can
> be null.

Well, pardon me for being more humorous than exactingly precise in a MADE-
UP EXAMPLE.