
Java is confusing, Clojure is simple - viebel
https://blog.klipse.tech/clojure/2019/05/10/java-is-confusing-clojure-is-simple.html
======
zxczxc111
The author forgot to mention that you can have immutable collections in Java
but then praises Clojure's immutable collections. The Java coded provided will
produce warnings due to the mixing of generics and raw types and actually I
had no idea about what the output of the Clojure code would be because the
author assumes that you have no questions "once a Clojure learner gets used to
Clojure syntax". Once you learn that there's a difference between primitives
and objects then the Java example becomes just as clear. Moot article.

~~~
Quekid5
Yeah, seems like:

a) category error: The simplicity in the example is due to immutability, not
language choice.

b) familiarity bias: I've learned X therefore it's simpler than Y. (It might
be true, but you'd need a lot more supporting evidence than relying on point
a.)

... anyway.

------
DrMagnus
This feels like someone who prefers Clojure really hard, and doesn't like
Java.

Admittedly, I'm a finance Java EE wageslave, but java is really not that
complex to understand. Objects are references, updating the referenced object
will change all objects sharing that reference.

Primitives are an admittedly confusing bit, but we're kinda stuck with them.

I don't think Java is "confusing" (but I am a bit biased), but deliberately
avoiding understanding the language isn't the same as confusing.

~~~
iLemming
Java as a language might be not so difficult to learn and understand, but
using it for writing real applications can become convoluted pretty quick.
Siding with Java in arguments against it, today is like arguing against
printing press in the 15th century - "This devilish machine takes the soul out
of divine process of copying a book by re-writing it by hand." non-Java JVM
languages popping up every few years for good reasons. Another platform that
has more languages is Javascript and Clojure beautifully simplifying work
there as well.

~~~
ErotemeObelus
The reason others prefer immutable constructs is due to a permanent and stable
cognitive blockage. [About half of programmers are incapable of understanding
mutable state]([https://blog.codinghorror.com/separating-programming-
sheep-f...](https://blog.codinghorror.com/separating-programming-sheep-from-
non-programming-goats/)). Functional programming solves this problem by
removing mutable state (almost) entirely.

Functional programming is like speed controls for trucks. It enables people
who have cognitive blockage to produce some work for the company. So it's
going to be promoted over and over.

~~~
DrMagnus
Functional programming is a concept, not a magic cure-all for bad programmers.

Java also supports functional elements (though I'm not implying it's a
functional language in the slightest).

I could have an optimistic view of programmers, but I feel like that article
is heavily slanted towards CS education, which is taught by people who
intrinsically understand computer science. I work with people who are
definitely not even approaching the middle of the bell curve in terms of skill
and efficiency. They still produce work in imperative programming, and without
introducing catastrophic levels of instability into the system.

~~~
iLemming
There's a lot more than just functional programming here. Use Clojure for a
couple of years, and I guarantee: it spoils you, and you would never want to
go back to your previous workflow - it would feel clunky and inefficient.
Nothing is perfect, I know. I know that not from watching videos or reading
blog posts - I have used many different languages "in anger." I like Clojure
because it makes sense to me today. I'm sure someday it stops making sense or
I'd have to use a different tool (better suited for some task). I keep looking
around, and I still can't find a language that gives me the joy of delivering
software without feeling miserable. Even with the most praised and loved
languages - it sometimes feels like your machine is interrogating you and you
are typing incantations to placate your computer's demands. With Clojure - you
simply build things. You can focus on what's truly important for you to get
the job done. It's not just a sense of familiarity. Clojure is far from being
my first or second or even fifth PL. However, none of the languages I have
previously used gave me that feeling of joy, curiosity, and confidence. It is
not magic, no. Still, it is a well-designed programming language.

------
banku_brougham
As a java novice and a Clojure non-entity, I found the article interesting and
helpful. I don't think the author is trying to convince enterprise java dev
teams to abandon java in favor of Clojure, its just a helpful comparitive view
of two languages meant for beginners.

------
throwawayjava
The article focused on confusion _among students learning the language._

First, imperative programming is important to learn. Understanding the
stack/heap and calling conventions is important. Yes, those things are hard to
learn. But once you learn them, they are not that confusing. These are
significant pedagogical concerns, but I'm not sure they are so important
beyond the classroom.

Second, FP is also confusing to new programmers but for different reasons.
E.g. anything that requires folds is typically easier in imperative settings.

~~~
viebel
Why imperative programming is important to learn? What will we be missing in a
LISP only world?

~~~
turk73
Nulls, dumb syntax, bugs, my high blood pressure...

In 2013 I tried darn hard to get a job doing Clojure but it never panned out.
The world just isn't ready, it seems.

~~~
iLemming
It was six years ago. Try again, maybe? Clojure is slowly but steadily
growing. The world is never "ready." It was never ready for Clojure, OCaml,
for Smalltalk, for Haskell, for Purescript, for Elm, for Erlang, for Elixir -
yet teams are using them, there are conferences all around the world, libs are
being written, podcasts recorded. There are jobs. I started writing
Clojurescript 3 years ago, and since then I can't find a better alternative
for myself - a language that is well suited to build awesome things and makes
me happy. I have changed 3 different jobs since then and never settled for
anything but Clojure. Never had a problem with finding a job.

------
based2
[https://lispcast.com/conj-mental-bump/](https://lispcast.com/conj-mental-
bump/)

------
vkaku
Very few tutorials know how to teach well.

