
Advanced programming languages (2009) - ZeljkoS
http://matt.might.net/articles/best-programming-languages/
======
dsacco
This post is very fortuitous for me. I've been looking to learn a functional
language and I had more or less narrowed my options to Haskell, OCaml and
Scala. I liked the breakdown between these languages and the resources.

Can anyone who programs in Haskell or OCaml regularly tell me the current
state of standard and third party library support? I'm very attracted to Scala
because it has JVM support, which sounds fantastic for overall ecosystem
maturity.

That said, I come from a C++ and Python background, so do I need to know Java
well before learning Scala?

~~~
premium-concern
I can recommend Scala:

\- It is mature and rock-solid, but still manages to evolve, fix issues and
simplify/remove features. Most other languages are purely additive, meaning
you will have to carry on all the baggage since the languages' inception.

\- It is a language which is interested in identifying the best way to solve
common programming issues and spares you with all this ideological "OOP/FP is
bad" bullshit.

\- It has the largest ecosystem (plus it can use all of Java's, too).

\- It has the best tooling.

\- It has the largest community.

\- It has some great learning resources, like the three (or four?) Coursera
courses starting in a few weeks.

\- Its JavaScript backend is stable and production-ready, Scala-Native is
being worked on.

> That said, I come from a C++ and Python background, so do I need to know
> Java well before learning Scala?

Java knowledge might reduce the amount of learning (as many Java things like
the JVM also apply to Scala), but isn't really necessary. You will be fine.

~~~
gaius
Once you have had real Hindley-Milner Scala feels painfully primitive. Just go
straight to OCaml.

~~~
dgudkov
Or go to F# and enjoy the vast universe of .NET.

~~~
gaius
To be fair Scala does have access to the Java ecosystem

------
feiss
What's up with functional languages nowadays? The exists since the dawn of
humanity, but they are getting very trendy lately. Is it just my perception?
Is it a HN thing? (I've been a reader for just some months)

~~~
jghn
2 things IMO

\- There's a long running pendulum that swings back and forth from FP. We're
currently in an FP cycle.

\- Current mainstream computing puts a heavier emphasis on concurrency and
distributed computing. FP's focus on immutability and referential transparency
makes it easier to reason about these.

~~~
nazka
> There's a long running pendulum that swings back and forth from FP. We're
> currently in an FP cycle.

I think this is also happening because Functional Programming can really give
us advantages, but also because it is very hard to understand fully (I am
looking at you monads). We see how it can reduce: the complexity, the
concurrency problems, or how we can code faster with it. But when we try to
use it in a production environment, we give up because it's too complex. So
you have this back and forth here in the field, between every wow moment with
FP being all cool, and then being too hard to "get" or to use in production.

Now I think we are getting there slowly. Trend after trend, we have more and
more the main languages that are really incorporating FP principles. And not
just as features. Plus many companies are pushing FP languages forward. Swift
is a significant push for it that should democratize FP principles to the
"masses", rather than a more "academic" crowd.

------
vinceguidry
I personally would really hesitate before picking a language that will be hard
to hire for to build a business around. Yes, you'll be more productive in the
short-term, but a business is more than just code and you will need to wear
those hats too before you'll have enough understanding and resources to hire
those out.

At this point, I'm fairly certain your first hire should be someone to take
the engineering load off of you. Engineering will be the only thing you
really, truly understand about your business and so it will be the only thing
you'll be able to effectively manage others doing.

~~~
dsacco
Jane Street Capital's Yaron Minsky once said that contrary to popular belief
hiring for OCaml developers was _easier_ because the signal to noise ratio in
the OCaml community is so much better than other, more approachable languages.
He would send a job post to the OCaml mailing list, get 15 responses,
interview 10 people, bring five onsite and ultimately hire three new people.

I don't have direct experience with this, but it makes sense in theory. PHP is
an easy language to find developers for, but it's incredibly annoying to
figure out how competent the developers you're interviewing in that ecosystem
will be. But languages like Haskell and Scala have a (perceived or real)
barrier to entry, so you typically have a higher median ability among
developers in those languages.

~~~
iheartmemcache
I've got managerial experience hiring (on both ends of the spectrum of talent)
and engineering experience in computational finance at a prop firm similar to
Jane Street. He has a fast-hire ability and high-signal to noise for sure but
_he works at a prop firm_. His hiring practices are a market anomaly simply
because he can pay effectively whatever a competent developer wants. Jane
Street can basically throw money at the problem. What you have at a 'normal'
company is a real difficult time finding someone who can tell me when to use a
lens and when to use a zipper in Haskell who are actively looking for
employment.

Anecdotal but I casually attend Boston Haskell and I can't remember the last
time someone was out of work other than 'funemployment' (e.g. a startup goes
bust and they have accrued more than enough money to just sit around, stretch
and work on pet projects). The second they 'need' a job, they'll casually
mention it and I think ~3 out of the ~7 times this has happened, someone in
the crowd went like "oh Bill, yeah come in to <his office> Monday and meet our
CTO". No recruiters, no wait. The CTO trusts Joe has heard Todd ask enough
insightful questions consistently enough that he's going to be a good hire.
Tuesday 9AM HR, 10AM pull the repo down, setup stack, start poking around
Haddock and start closing the easy tickets. Good talent (10 of the 15
applicants are quality) might respond to Minsky but those other 9 guys will be
picked up almost invariably in well under two weeks

~~~
jghn
OT but how useful would the boston haskell meetups be as an extreme noob? Will
the talks be so far over my head that I should learn me a haskell a bit prior
to attending or would it make for a good way to start absorbing some
knowledge?

~~~
tikhonj
I haven't gone to the Boston meetup specifically, but my experience with other
Haskell meetups is that the level of talks varies significantly, both in how
much _Haskell_ you have to know and how much general math/CS knowledge is
expected.

If you're a beginner along both fronts (which is great: Haskell is a wonderful
place to start), you might need to look at the talk topic ahead of time and
choose ones which seem the most accessible.

If you're just a beginner in Haskell but comfortable with general math and CS
topics, chances are that many talks won't be too Haskell-specific and you'll
learn something interesting even if you don't get all the Haskell details.
I've attended talks about things like succinct data structures, concurrency
models, FFT algorithms... etc. All of these _used_ Haskell and Haskell
concepts, but weren't _just_ about Haskell; you would have gotten something
out of them even if you didn't know much about Haskell specifically.

I don't think most of the talks will be great for _learning Haskell_ (unless
that's their explicit aim) so if you actually want to learn the language
you'll _also_ need to do some reading on your own, but going to the meetups
will still be valuable.

------
agumonkey
After walking in the land of functions for a long time I wonder if there are
advanced advanced languages.

~~~
PeCaN
Well, there's:

\- Dependently typed languages (ATS, Agda, Idris)¹ should be fairly familiar
if you're a Haskell veteran.

\- Array languages (APL, J, K, and more obscure ones like Nial) are pretty
enlightening if you're a functional programmer (at least they are for me).
Most of these trace to Ken Iverson and his _Notation as a Tool of Thought_.
They are a bit brain-bending at first, largely because of the density, but
they're fun to use and the density makes comprehension easier after a while.

\- Function-level languages (FL, FPr, J) – a somewhat obscure and very
advanced sister to functional programming. If you're familiar with Haskell
Arrows, there are many parallels. They are, essentially, a more convenient
point-free style. Most (all?) of these trace to John Backus (of Fortran and
Backus-Naur Form fame) and his 1977 Turing Award lecture _Can Programming Be
Liberated From the von Neumann Style?_

J ([http://jsoftware.com/](http://jsoftware.com/)) combines array and
function-level programming, and IMO is a very good language to learn to expand
your horizons if you're a veteran functional programmer.

\--

¹ Coq kinda, but it's more of a theorem prover than a programming language.
Agda sort of fits that too.

~~~
agumonkey
I had gnu apl installed (along with emacs mode:). APL and it's siblings are
amazing, tiny, expressive, light.. lot to love. Juts nothing as mind bending
as; say lambda calculus.

Didn't know FL/FPr were arrow-like. Didn't even know they were implemented ..
I thought Backus quit because of IO.

Lots of people are suggesting the Idris/Agda road .. I guess I have my answer.

~~~
PeCaN
As far as FL/FP/FPr go, [http://www.call-with-current-
continuation.org/fp/](http://www.call-with-current-continuation.org/fp/) is
the most mature and complete implementation I'm aware of.

There's #proglangdesign on freenode where a bunch of us have been on an array
language/function-level streak lately. Some people there might be aware of
more.

~~~
agumonkey
brilliant , I didn't know about the ccc impl nor the IRC chan. I know some
folks that might be interested.

------
agounaris
what "advanced" even mean? All those languages, they don't do something that
others are not capable of(not mention that all the jvm ones just produce
bytecode over the same vm)...different development principles is not a reason
to call a language advanced.

~~~
MichaelBurge
Haskell and ML at least have advanced type systems. Since types are erased
during compilation, you can't reason about type systems in terms of their
impact on the generated code. An example of a simple type system is C with its
structs.

Haskell also has lazy evaluation, which is very difficult to do in C.
Obviously you could encode your own trampolines, but at that point you might
as well be coding in a Turing tar pit language "where anything is possible but
nothing of interest is practical".

Pattern-matching and ADTs are also usually difficult to do in other languages.

Most of the benefits of something like Haskell only show up on larger
projects, so it's not meaningful to point to specific language features as a
point against it. I can do just about anything in C. The type systems you
probably can't do; you'd have to embed a language and that doesn't count.

------
AtticHacker
I'm really surprised that "Learn you a Haskell" is not in the Haskell
resources list.

~~~
MichaelBurge
I've seen people recommending this book more recently:
[http://haskellbook.com/](http://haskellbook.com/)

I'm not sure I like LYAH as a practical resource: It's silly and might put
people at ease, but I wouldn't feel comfortable writing a database or parsing
tool or compiler after reading it.

Real World Haskell is better for these, but is a little dated by now.

~~~
jerf
LYAH is really good for getting you over the first big humps of learning
Haskell, if you've never learned a language like Haskell before. I still
really like it's explanation of monadic values. It builds up to them in a nice
way. If you can pull open a GHCi session while reading that portion of the
book and play around on the interpreter while reading it, you'll learn some
good stuff. (As with many programming books, it may not seem logical, but I
recommend typing out all the examples you find yourself. It works.)

It does not itself teach you much practical stuff. But if you learn what is in
LYAH, you'll be pretty close to what you need to pick up most of the practical
libraries in Haskell and understand the API level enough to use it, because
once you get over that particular difference of Haskell's libraries, you can
start working with them like you would any other language's libraries, and
incrementally fold in the "Haskell special sauce" as you go, while you are at
least learning things instead of stuck adding numbers together and filtering
lists and all of the other handful of things you can do without files,
network, or anything else you need an IO-based library for.

------
lispm
Steele developed the early Scheme language together with Gerald Jay Sussman.
Common Lisp wasn't designed by Steele alone, but by a larger group of people,
including Steele, Weinreb, Fahlman, Gabriel and Moon.

------
AnthonyLloyd
Any reason F# is not in the list?

~~~
throwawaysocks
Writing/deploying F# on a non-Windows machine is a huge pain. Been there,
won't do that again.

~~~
saosebastiao
It's not. I actively refuse to use Windows and have never had any trouble
installing or using F#. I've only really used it in the last 1.5 years or so,
so maybe what you claim was true in the past, but it is not true anymore.
There are other reasons to not like it though. For me those would be a lack of
HKT and functors, and its primitive compiler optimization due to relying
heavily on a VM built for a _very_ different language.

~~~
throwawaysocks
This was > ~3 years ago, so maybe things have gotten better lately.

------
dang
There have been many discussions of this post:
[https://hn.algolia.com/?query=Advanced%20programming%20langu...](https://hn.algolia.com/?query=Advanced%20programming%20languages%20might&sort=byDate&dateRange=all&type=story&storyText=false&prefix&page=0).

I fear that the current one shows signs of HN's inevitable reversion to the
mean.

~~~
sgt101
Help us break away : nothing is inevitable, the future is unwritten!

------
eatonphil
If you are interested in picking up or dabbling in SML, I recommend checking
out the /r/sml wiki [0]. I'll also single out the #sml channel on Freenode as
a great place to get help if you get stuck.

[0]
[https://www.reddit.com/r/sml/wiki/index](https://www.reddit.com/r/sml/wiki/index)

------
Bromskloss
> It's untyped, which makes it ideal for web-based programming and rapid
> prototyping. Given its Lisp heritage, Scheme is a natural fit for artificial
> intelligence.

Why does being untyped and having a Lisp heritage make Scheme suitable for
these three tasks?

~~~
phamilton
Web based is because JSON is always easier with dynamic types.

Rapid prototyping is because it requires less explicit up front design due to
dynamic types.

Artificial Intelligence is because metaprogramming is easier in homoiconic
languages.

~~~
edgyswingset
> because JSON is always easier with dynamic types.

I think you mean JSON where the schema isn't defined. If you have full control
over the JSON you're consuming, you control the schema. Typed languages aren't
any worse than dynamic languages in this case.

> Rapid prototyping is because it requires less explicit up front design due
> to dynamic types.

Many types languages have a REPL environment specifically for this reason. In
my experience, it's not any slower.

> Artificial Intelligence is because metaprogramming is easier in homoiconic
> languages.

I have no experience here, thus I will assume you are correct.

~~~
phamilton
Complex, recursive JSON schemas are much more difficult even when the schema
is known in most typed languages. Not impossible but I've definitely found
myself changing my schema design because of friction in parsing JSON in Java.

------
ikurei
He only mentions Clojure in passing. At some point I decided that, were I to
learn a functional language, it would be Clojure. How would you say Clojure
fits in this comparison? Is it only relevant or interesting for concurrency?

~~~
calibraxis
The article's 7 years old. Clojure's first stable release (1.0) was released
the same year.

~~~
ikurei
Thanks, I knew it wasn't new but didn't think it was so old.

------
eddd
I don't know much about Scala but Erlang/Elixir fits quite good to the
description as well:

> Scala is the programming language I use for tasks like writing web servers
> or IRC clients.

~~~
yawaramin
Scala has a very well-regarded implementation of Erlang's actor system. I have
personally seen it handle hundreds of thousands of requests spun off as
lightweight threads.

~~~
kmiroslav
The JVM (well, Java really) has been supporting orders of magnitude of that
for many years.

------
ethbro
_> In academic research and in entrepreneurship, you need to multiply your
effectiveness as a programmer, and since you (probably) won't be working with
an entrenched code base, you are free to use whatever language best suits the
task at hand._

... with the _extreme_ caveat that your language has bindings to {insert
language with libraries that already implement 50-85% of your functionality}.

------
galangalalgol
I need a suitable sized project to implement in a niche language I am
learning. I used to use tetris but it isn't big enough. It needs to exercise
multi threaded updates of some state consisting of many elements and their
relationships based on user or file inputs. I think. I want to write it in c++
then learn Haskell and use that. Then use c++ again and look at the
differences.

~~~
detaro
multiplayer tetris?

~~~
c-smile
"multiplayer tetris" is the game played by UN Security Council, so why not?

------
anoplus
I would argue that a well-known language is fairly expressive in the sense
that it is well-known.

Imagine English itself was a programming language - this is the best. But for
now I would recommend using those who are commonly used in the common
platforms of interest (Java, javascript, C etc)

~~~
greydius
> Imagine English itself was a programming language

That's a terrible idea.

[https://en.wikipedia.org/wiki/Buffalo_buffalo_Buffalo_buffal...](https://en.wikipedia.org/wiki/Buffalo_buffalo_Buffalo_buffalo_buffalo_buffalo_Buffalo_buffalo)

~~~
anoplus
Yes, but in any language - syntactically valid code is not necessarily good
code

------
coygui
I once watched this youtube
video:[https://www.youtube.com/watch?v=02_H3LjqMr8](https://www.youtube.com/watch?v=02_H3LjqMr8)
as the entry to Haskell world.

~~~
knucklesandwich
Haha here was my personal intro to the world of haskell:
[https://www.youtube.com/watch?v=RqvCNb7fKsg](https://www.youtube.com/watch?v=RqvCNb7fKsg)
. Was instantly hooked.

------
iLemming
I am a bit surprised Clojure and Clojurescript are not in this list. I guess
Clojure still was a bit young at the time this article was written. Within
past few years Clojure has become extremely popular.

~~~
calibraxis
Yes, its first stable release (1.0) was around the same year this article was
written.

------
tonyjstark
For a real world project pick a suitable language that will not only help you
to implement whatever you have to implement but also to maintain the project.
Also you should be able to find other programmers knowing that language if you
need to. Maybe even use the language you already know even if it is not the
newest and hottest stuff.

But for private or side projects use whatever enlightens you. Those projects
should be fun and it's always good to learn new things on the way. I even
think you don't have to learn all new languages in depth but just do a small
project and reflect if it is something that gets you somewhere. You probably
wont write a big business application in Smalltalk but all that message
passing, awesome. Seriously have a look at Smalltalk.

~~~
kensai
Has anyone experience with "Curry" (functional logic programming)? If it has
all the advantages of Haskell plus some possibilities of logical languages, it
should be really interesting for experimental approaches.

[http://www-ps.informatik.uni-kiel.de/currywiki/](http://www-
ps.informatik.uni-kiel.de/currywiki/)

~~~
startling
GHC is top notch, I wouldn't say any language without a mature compiler "has
all the advantages of Haskell".

------
michaelfeathers
Prediction: APL, J, K, or Q will be on this list soon.

~~~
adamnemecek
idk if you are serious or not but part of me feels like the fact that those
languages haven't gained much attention in the last 30 years means that they
won't get much attention in the future.

~~~
michaelfeathers
I think it's inevitable we'll use some of their toolset. The problems we solve
don't get easier so we will reach for more powerful tools.

As an example, just being able to think in terms of a transpose makes many
problems trivial: [http://michaelfeathers.silvrback.com/moving-quickly-with-
com...](http://michaelfeathers.silvrback.com/moving-quickly-with-
compositional-chains)

------
RobertDeNiro
What about javascript? Could that be a decent language to get into functional
programming? It's definitely mainstream enough.

~~~
Roboprog
You're lucky you didn't get voted down -5, with the Type Police out and about.

I like ES5 (would be ES6, but for IE support...) Javascript, but it is a bit
light on the immutability aspect, given the environment and problem set it
usually runs in.

Check out the "Ramda.js" library for JS
([http://ramdajs.com/0.21.0/index.html](http://ramdajs.com/0.21.0/index.html)).
There's some good concepts put to use there. (although I have my own version
of "currying" implemented at work, as I like to sometimes have "0 arity"
functions for event handlers -- but those types of "functions" aren't
particularly "pure")

------
shocks
Can someone comment on what it's like building a webapp with Scala/Play?

~~~
virtualwhys
Unlikely you'll be cranking out a Rails style MVP in Scala + Play, but you
will produce a robust, blazing fast, scalable application that's a dream to
maintain and build upon.

In short, Play is a really, really good MVC framework. For SPAs you can go
lightweight with just Play's router and WS api, or try something like http4s
for a more FP-based REST api.

Throw Scala.js into the mix and you've a got a fully typed stack across the
board.

and then Scala Native on the horizon...things are looking good in Scala land
;-)

~~~
draven
> you will produce a robust, blazing fast, scalable application that's a dream
> to maintain and build upon.

At work I'm working on a scala/play app. It was 2 years old already when I
joined, and the first scala/play project for the team. It's not that fast or
scalable. That is to say, scala and/or play are not silver bullets that will
make your code hyper optimized and scalable.

ATM I'm working on performance. There are a few blocking calls in the API that
are used everywhere and they manage to block the various execution contexts
(controller, akka, etc.) It's a mistake to use blocking calls when it can be
avoided, but it's an easy mistake to make.

So yeah you can write robust / fast / scalable / maintainable apps in Scala
but you need to properly learn it first.

------
jkot
> _Scala is a rugged, expressive, strictly superior replacement for Java._

Scala is not replacement for Java. It runs on JVM and can invoke java code,
but has completely different approach than Java. Use Kotlin if you want Java
replacement.

Also I would argue that Scala is much better suited for writing compilers than
Haskel.

~~~
hibikir
Scala can be a fine Java replacement, if you drop 20% of its features on the
floor. As long as you never see a higher-kinded type, I think you are ahead of
Kotlin, and the learning curve is not really any different.

The problem with this approach is that 90% of Scala libraries are built by
people that live in higher-kinded land, and believe that since they have
reached that level of expertise, so should everyone else, the second they
start learning the language. For instance, look at SummingBird: The hello
world example includes F bounded polymorphism, and path dependent types!
Anyone new to the language would run away screaming, and I'd not blame them.

~~~
jkot
Scala compatibility is not so great. It has its own collections and other
libraries. And it does not even support java getters and setters.

~~~
premium-concern
Why would you create a new language and then keep a huge part of what
developers interact with on a daily basis in such a broken shape as in Java?
(Or rack up a massive amount of complexity and break your typesystem by trying
to put lipstick on the Java collection pig? (Kotlin).)

~~~
jkot
1 billion lines of code, that is why.

------
Maro
I prefer practical programming language extensions, like the new C++ standard
which adds useful things, or Hack which makes PHP useful, or the typed
extensions to Javascript and Python.

~~~
edwinyzh
Well said!

------
jenenliu
c++ programmer wants to learn scala now :)

------
brett40324
I am still stuck on why this is titled Advanced Programming Languages. Wait,
so anything other than the most widely adopted robust language technologies
used in enterprise systems is 'advanced'? Language compilers, interpreters,
database engines, and runtime implementations are advanced. Who says, "we need
an advanced language for this solution", as opposed to "this problem requires
an advanced solution"?

~~~
tomc1985
OP reeks of subjectivity.

"Scala is a rugged, expressive, strictly superior replacement for Java."

I have nothing for or against Scala, and Java is a popular target. But
"strictly superior"? There are critiques of the language and its toolset that
contradict the strictness of its superiority. ([https://www.quora.com/What-
are-some-criticisms-of-Scala](https://www.quora.com/What-are-some-criticisms-
of-Scala))

~~~
premium-concern
I think "strictly superior" makes sense in the way that Scala was never
designed or intended to be a worse-is-better language like Java and people
were willing to make that happen by evolving the language. It was never
intended to be a Java-with-more-concise-syntax unlike some other newer
languages.

If something was clearly worse, it would have been changed years ago already.
That some design is still there might suggest that some people just have a
different minority opinion on some aspects. (Assuming that "strictly superior"
does not mean "100% of devs agree 100% that this is 100% better than Java".)

------
YeGoblynQueenne
Datalog for constraint programming, but not Prolog? Oh come on. If you're
going to recommend languages, look some up, already.

------
tr1ck5t3r
Select the best language for the task in hand.

At the end of the day, they all ultimately control the same instruction sets
on the chip's either directly or indirectly through a framework or libray
and/or operating system.

