top | item 16272012

Ask HN: What's the most underrated programming language?

49 points| mohitmun | 8 years ago

Recently I started reading about erlang[1][2], And I started feeling why its not widely popular as python or go. Though I have very little knowledge about functional language and tradeoffs when it comes to using them. Just wanted to know more about it and any other languages which are underrated

[1]blog.whatsapp.com/index.php/2012/01/1-million-is-so-2011/ [2]https://stackoverflow.com/q/2708033/2577465

166 comments

order
[+] wizardofmysore|8 years ago|reply
Java is really underrated. It is popular but it isn't thought of as powerful or cool as compared to python, haskell etc.. I disagree.

a. Object oriented code done right is the best way to handle production code.

b. Java has introduced streams, lambdas etc.. has any other language shown this type of adaptation to times ?

c. Python, Ruby etc.. don't have equivalent performance

d. c++ obviously beats it on performance but I know the pain of porting c++ code

e. Most of the boilerplate code is either auto-generated or you can use Lombok type framework to generate them for you

f. Java made a really good comeback with Android

So the new kids in the block might not like Java because it isn't cool but Java has stood the test of time.

[+] statictype|8 years ago|reply
Java's main strength is the jvm. C# as a language is superior to Java in pretty much every meaningful way.

All the things you mention about Java were done in C# and much more elegantly.

Where Java shines is not the language but the runtime behind it.

[+] virmundi|8 years ago|reply
I've been banging this drum lately on HN too. Spring Boot makes Java fast, easy, and simple. Yes, you still have to install a JVM on your image, but there are plenty of management script out there to get a container or VPS running.

For people out there that look at all those getters and setters with contempt: you don't need them for your JSON objects. Just use public. The frameworks will still serialize and deserialize without issue. Use JSON annotations to define what a valid message is. Yes, you'll need a mapping layer between your JSON/inbound messages and your domain, but you need that anyway, otherwise your API is brittle.

JPA + Spring can lead to fast DB code and development time that rivals NoSQL with Postgres. You can have it autogenerate the DB during dev time with each boot, then create Liquibase migration documents for true devops stability.

After working with Go for a month, I really think Java just does things right. Servlet API is simple. Spring makes it easier. Transactional management + AOP is wonderful. So many cross-cutting concerns allow you to properly encapsulate and apply the logic in a few AOP. You just can't do that with GO without a lot of compiler work.

[+] zeveb|8 years ago|reply
> Java has introduced streams, lambdas etc.. has any other language shown this type of adaptation to times?

Well, Lisp added CLOS, which was a huge adaptation to the rise of OOP. It also originated lambdas. I don't know if streams originated in Lisp, or if they were an adaptation from another language.

> Most of the boilerplate code is either auto-generated or you can use Lombok type framework to generate them for you

That's why I prefer a homoïconic language: I can write & generate the boilerplate in the language itself.

> Java made a really good comeback with Android

I don't know if that's true so much as there really aren't good options to Java on Android. I'd give my eye teeth for a good Go GUI SDK for Android, for example.

[+] icebraining|8 years ago|reply
b. Java has introduced streams, lambdas etc.. has any other language shown this type of adaptation to times ?

"Adaption to times"? Lambdas are older than Java itself. It was outdated in v1.

[+] Spartan-S63|8 years ago|reply
The best answer to your point b is C++. It's shown a ton of adaptation to the times. Almost to a crazy extent as you see tons of new features hit in each standards revision (C++11, 14, 17, etc). To me, it keeps up more quickly than Java.
[+] eksemplar|8 years ago|reply
Is it though? I work in the Danish public sector which is mostly windows based enterprise and 80-90% of our infrastructure runs on JAVA with no change in sight. Hell, most influential people will straight out laugh at the notion of JAVA losing steam. It did dip for a while some years back, but these days it’s frankly the strongest I’ve ever seen it.

Of course it’s not popular for hobby projects, startups, academia or data science, but those fields are frankly dwarfed by enterprise on the job market.

C# has a stronger hold in the private sector, but scince most of the public software is produced by the private sector even there JAVA runs strong.

[+] mixmastamyk|8 years ago|reply
Kotlin will get you these without the:

   Foo foo = new Foo();
Nonsense. Highly recommended.
[+] cousin_it|8 years ago|reply
Java has many features that are amazing for larger projects:

* Instant recompilation

* One string type

* One error handling system

* Capitalized identifier = class name = file name = imported name

* English names for everything and no operator overloading

All these are ignored by e.g. Haskell or Rust.

[+] kodablah|8 years ago|reply
I agree with the answer of Java, but saying "object oriented [...] is the best way", "has any other language shown this type of adaptation to times", "etc.. don't have equivalent performance", etc is going to get you some flak. I don't agree with any of those statements.

As someone who has done a lot of Scala and Kotlin, I appreciate Java because I can anticipate the bytecode that will be generated. This is important to me on low-level JVM projects (profilers, fuzzers, etc).

[+] dmitriid|8 years ago|reply
> has any other language shown this type of adaptation to times

C#

[+] jrs95|8 years ago|reply
> Java

> Object oriented code done right

Pick one.

But in all seriousness, Java is definitely underrated amongst many who are working with the trendier technologies. It's not perfect, but it gets the job done, and it's a solid platform with phenomenal tooling.

I don't think "Python, Ruby etc. don't have equivalent performance" is actually very important though. In practice, the availability of developers in a particular market, legacy code, and static typing & refactoring tools probably have much more to do with Java's success than performance.

[+] aloisdg|8 years ago|reply
Well C#? (and Android through Xamarin but I didnt use it so...)
[+] banashark|8 years ago|reply
Not underrated, but F# gets a lot of flack for what has proven an extremely usable and productive language.

* It is functional and succinct by default, but allows you to go mutable and fast when needed (see the alioth benchmarks).

* Open source culture

* The tooling (thanks to kcieslak and others) is fantastic

* Web story is covered well by suave/giraffe on the backend, with fable-elmish as a personal favorite if I need complex front-end functionality (most stuff I have is just regular pages though).

* Mobile story through Xamarin(Forms is not my favorite, but Native works fine) or Fable

* To mention javascript again, I think Fable has a ton of well thought out features compared to other transpiled languages

* Testing via expecto (and just github.com/haf in general)

* A whole wealth of libraries through .net integration

* I can compile a binary to execute on linux for easy deployments, or target osx to create convenience command line applications for my coworkers

There are some negatives (some C# interop gets inelegant, some tooling is left to the community as a responsibility, other minor things), but overall it has all of the important things.

[+] o2348diuu|8 years ago|reply
Nim. I understand some reasons for this, as I didn't pay attention to it very much for awhile myself. I think it's only the last year or two that it's reached maturity. Its primary alternatives also have the advantage of huge existing resource bases.

I'm someone who thinks there is room for lots of good languages, and each has its role, so I don't think languages should be pitted against one another necessarily.

However, with Nim you have something very similar to Python in its expressivity, but with performance comparable to things like Rust and C++. The metaprogramming is very well done as far as I've seen, and it seems very well thought out. It also has solid, useful compilation targets.

It just seems like the whole package for a lot of use cases and I'm not sure why it's not getting a lot more attention.

[+] 3pt14159|8 years ago|reply
I’ve used nim in production and I even wrote a very small part of the language itself; and it’s great in many ways, but unfortunately it lacks taste. When a language gets that complex it needs to be consistent and it needs to exhaustively cover use cases and nim is obviously better than C, no question, but it’s no Ruby. Maybe it will be one day, but for now having a smaller amount of features like Rust allows for a cleaner more cohesive picture and building on top of that is easier. Though I hate Rust’s syntax. Crystal looked promising for a while, but dev there is slow.

I still wish the coffeescript model had worked out where we could view or think about languages differently and compile them to a common one. But unfortunately it doesn’t work without a great deal of effort.

[+] eeZah7Ux|8 years ago|reply
Multiple and optional GC methods, exception tracking, effect system, ability to generate C and JavaScript, C-to-Nim translation and wrapper generation.

Nim is underrated indeed.

[+] jordigh|8 years ago|reply
D.

It really is a great successor to C++, with lots of new ideas taken from other languages too, and some very insightful language designers. I wish people would give it more of a chance and not stop at "it has a GC" and decide that this makes the whole language worthless.

It's been around for a while but hasn't gotten popular yet. I don't know if the weird license for the reference compiler is what slowed down adoption. At least for me, that's why I was hesitant to commit to D. After the license change, I've had so much fun with it.

[+] nanny|8 years ago|reply
>I wish people would give it more of a chance and not stop at "it has a GC" and decide that this makes the whole language worthless.

Seriously! I've never seen anyone complain that e.g. Go has a garbage collector, and Go's is not even optional. The only thing Go has over D is a large corporate sponsor.

[+] virmundi|8 years ago|reply
I argue it was the collection wars and few new books after the dust settled. You can't have the community split over which List implementation to use. Especially now when picking one side locks you into for the rest of that projects life and they are incompatible with the other collections.
[+] notacoward|8 years ago|reply
I'm going to riff on what Null-Set said about Ada, which people like to criticize for its complexity but which actually solved a lot of hard problems in very creditable fashion for its day. The complexity complaints are a joke, considering that that both Java and C++ have since become more complex than Ada ever was by trying to solve some of the same problems -and in C++'s case largely failing. If Ada (or its relative Modula) were introduced today, it would seem like a breath of fresh air compared to those two.

Special runner-up: MOOcode, the native language of LambdaMOO. Still one of the most coherent and pleasant object-oriented languages I've used. It's especially notable for its "code runs as author not invoker" protection model and call-stack introspection. People could learn a lot from that.

My first thought was Nim, and o2348diuu already explained why. Second thought was Lua, but a couple of people beat me to that. Haskell and Elixir are definitely not underrated. They're underused, certainly, but that's not the same thing and IMO Haskell is often overrated.

[+] farnsworthy|8 years ago|reply
Can we call SQL a programming language, or no? (I was trying to think of someone who's been around for a while, but maybe doesn't receive his just due.)

SQL seems to power nearly everything at some level, has much code written in other languages for the sole purpose of interfacing with it (for better or worse), has inspired other concepts and technologies (even as they are defined against it as what they are not), etc.

I don't think anybody mentioned C yet either, another foundational case…

[+] rntz|8 years ago|reply
If SQL deserves consideration for being "underrated", Datalog certainly does.

Compared to SQL, Datalog makes recursive queries very natural[1], making it good for manipulating graph-like structures. For example, here's reachability in a graph:

  reaches(X,Y) :- edge(X,Y).
  reaches(X,Z) :- edge(X,Y), reaches(Y,Z).
That was easy!

Variants of Datalog pop up in unexpected places. Datalog dialects are often used for implementing code analysers (e.g. Semmle). Datomic's product is a variety of Datalog with S-expression syntax. UC Berkeley has a Datalog-based research language called bloom (http://bloom-lang.net/faq/) aimed at implemented distributed systems. Datalog was also an influence on the recently-shuttered Eve (http://witheve.com/) project.

In its original form Datalog lacks aggregations, which is probably a big part of why it didn't catch on - aggregations are important! Still, some Datalog implementations add support for aggregations. Unlike SQL, Datalog never really became a standard; more an academic ideal than a practical tool. I think this is a shame.

While Datalog doesn't have a canonical practical implementation, in terms of impact on how people think about data query languages, I think it's an academic gem.

[1] SQL has recursive queries ("Recursive CTEs"), but they're neither widely used nor particularly well-supported in most SQL implementations - they're basically tacked on. This is partly because they're hard to optimize due to a lack of restrictions; with Recursive CTEs, SQL is Turing-complete. Datalog deliberately isn't, and there's a large literature on optimizing evaluation of recursive Datalog.

[+] gargravarr|8 years ago|reply
Where SQL excels is working on vast batches of data without using loops. Once you can think in terms of datasets, it becomes very logical to process it all at once.

Nobody needs to mention C because it is definitely not underrated - it's earned its reputation and is respected/feared by developers everywhere!

[+] TimJYoung|8 years ago|reply
Object Pascal (FreePascal/Lazarus/Delphi)

Many, many production applications have been written using these languages/environments, but the language has fallen out of favor since the early 2000s.

- Code is easy to read and understand, and you can get a new developer up to speed quickly

- Can be used as a high-level language, a low-level language (you can even include in-line assembler), or both

- Blazing fast compilation

- Statically-typed, and includes classes, records (structs), reference-counted interfaces and strings

- Lots of implementations and platforms

[+] jetti|8 years ago|reply
I started picking Object Pascal up (FreePascal & Delphi varieties) and was amazed by it. It is rather simple and compiles to native code. Not only that, you can create mobile apps (and even macOS apps) with both Delphi and FreePascal.
[+] BrandoElFollito|8 years ago|reply
I spent nights on Pascal (Borland) coding a Conway's game of life on an IBM PC as a student. One of fondest memories from 1990 I think.

It was a great language, the first real one I learned.

[+] danielvf|8 years ago|reply
There once was a language that compiled in milliseconds - you pressed a single button and your changes were instantly in front of you. What's more a clever separation of data and code meant that this instant reload would show your newly compiled app with your data still in place, and you looking at the same screen as before, exactly where you had left it, except powered by your new code.

This separation between data and code also enabled trivial scaling for huge system, as well as the opposite - hundreds of apps, each belonging to a different customer could share the same system - decades before docker or k8 was born.

This language was written when Objects were the only thing people talked about. In a counter-cultural move, the language's author wrote the entire standard library as only functions. The language could be easily learned - just look at the list of functions for the one that does what you want.

It's cross platform - the user interfaces you build work on all platforms with a single codebase.

Its combination of scaling, quick development iterations, and ease of use powered the rise of fourth largest tech company in the world today. In fact, just a single app written in this language has more than a billion people using it every day.

Darkly, however, the name of this language may not be spoken here. Even by praising it obliquely, I risk censure, and my perceived value of my work being cut by eighty percent in penalty.

I will not name it.

[+] elefantastisch|8 years ago|reply
The language is PHP.

The instant reload and not losing your place is because changes to the server do not affect what's in the browser.

Customers sharing a system works because you can just have directories of PHP files.

PHP was developed without any kind of object system.

PHP is completely cross-platform because the UI is in the browser.

PHP powered Facebook.

PHP has a very poor reputation here.

PHP is in the top 10 tags on StackOverflow.

[+] friendly_chap|8 years ago|reply
I think it's Haskell.

I know sometimes it gets some hype but Haskell and its ilk is just so above the quality of any other language it's mind bending. Whenever a hard language design problem comes up in any new language, Haskell has solved it more than 2 decades ago.

The ecosystem (Hackage etc) is pretty bad though.

[+] jstimpfle|8 years ago|reply
why is the ecosystem bad? While no metrics for "underrated" are proposed here, I would say, empirically Haskell does not seem like your go-to language if you want to develop useful and maintainable software.
[+] pka|8 years ago|reply
Yeah. Haskell is so imba people don't believe you when you tell them :)

It's understandable to show skepticism about "the new shiny thing" (although Haskell is > 30 years old) because most new shiny things turn out to be not that great after all. I've been struggling to communicate the "no, but really" distinction without much success to other people and it's frustrating.

(...for purely egoistical reasons though, I don't really care what people are using as long as I get to use a sane language in my day job, which is currently not the case.)

[+] js8|8 years ago|reply
I agree, I think the diagram on page 12(?) of http://dev.stephendiehl.com/nearfuture.pdf sums it up nicely.

If you think this is smugness, look into it. The features that come up with GHC extensions have no equivalent in other languages, because the commonly used stuff in Haskell so far ahead.

[+] jjaredsimpson|8 years ago|reply
Haskell was the first language I learned that I actually loved in an irrational way. I consider myself to be a 3/10 haskeller because I've written a couple thousands lines, but never built anything "real" with it. But it is just such a beautiful experience to be writing it. It feels very much like a pit of success.
[+] ulrikrasmussen|8 years ago|reply
Stack (haskellstack.org) has pretty much solved the problems associated with building directly from Hackage though. The biggest pain when developing Haskell code continues to be the lack of good debugging facilities.
[+] saosebastiao|8 years ago|reply
Haskell hasn't solved GUI design, and it probably never will unless it comes up with a better way of modeling mutable state.
[+] howToLearnSpark|8 years ago|reply
that's so true. I woulnd't call it underrated though as it's pretty much one of the defacto starting programming languages universities use.
[+] henrikeh|8 years ago|reply
Wolfram Language / Mathematica. Probably not "underrated" since it is backed by an entire company with the sole purpose of developing it -- but as a programming language it is absolutely underappreciated.

* Essentially a Lisp. Data and program can be freely interchanged and is frequently done in completely normal code.

* The most impressive "standard" "library" in existence: everything from symbolic calculus, machine learning, UI building, graphics, signal processing, data import and export, foreign function interfaces and it just goes on and on.

* Incredible attention to consistency and interoperability. Everything behaves in predictable and orthogonal fashions. Right from the low-level pattern matching up to interacting with the build in database.

* The best documentation of any programming language. Nothing compares even slightly in breath, friendliness, consistency.

[+] hluska|8 years ago|reply
I'll say PHP because it's so underrated that I'm somewhat afraid to mention it here.

It's far from the most sane language I've ever used, and as much as I love it, I'll admit there are parts of the syntax that straight up hurt my soul. Yet, despite all the drawbacks, if I need to write something fast, PHP and a micro-framework (I like Slim) is always my first choice.

[+] dvfjsdhgfv|8 years ago|reply
D - it could be a replacement for many languages right now, and in many aspects is superior to Go, but since it lacks a big brand behind it, people are afraid to use it (although some do, successfully).

Another one is Nim, with great potential, but still some rough edges here and there.

Last but not least: Red. If this language gains momentum, it will change the game forever. The current implementation take the concept of cross-compilation to a new level (although the current lack of View on Linux is somehow disappointing.)

[+] Philipp__|8 years ago|reply
Clojure. It’s built on top of JVM, it’s dynamically typed but it makes so much sense, it’s probably language that makes most sense out of dynamic type system. It really is language for solving problems, if you get past that initial brackets lisp barrier, it is amazing, very efficient and it feels really good to solve problems with it. I don’t know why but it just feels great to use it. Plus it has really nice tools for Emacs. I am learning it and really enjoy it, astonishingly powerful.
[+] dsr_|8 years ago|reply
Nobody loves Perl, but it holds the world together.

Perl is happily unoptimized for anything, and is usable for nearly everything. It's easy to write and easy to make it hard to read.

You can write Lisp in Perl, and some people insist on it.

The CPAN repository has a module for nearly everything, and an amazingly high percentage are well documented.

There are some weirdos who love Perl.

[+] lazyjones|8 years ago|reply
The whole Wirth family of languages. They had clean, readable syntax, proper modularity, fast compilation, good performance, safety, productivity, GNU compilers. But they were shunned because people apparently didn't want to type "begin" and "end" and preferred unintelligible, clever tricks in C.
[+] kangoo1707|8 years ago|reply
To me it's Elixir. My company is a PHP shop, which results in complicated OOP stuffs (from most junior devs), as well as the inability to take advantage of concurrency. The syntax of PHP makes me sick just to look at.
[+] jernfrost|8 years ago|reply
Probably not underrated but not very well known. I’d say Julia as it easily one of the best script languages.

But I’ve also wondered why D is not more widely used as it is a much nicer version of C++ and integrates fairly well with it.

Also a bit odd that OCaml and SML isn’t more widely used

[+] hercynium|8 years ago|reply
This depends on your definition of "underrated" but I'd definitely throw Perl 5 into the ring here.

Edit: Specifically, Perl 5 + CPAN is what makes it so much better than many people think. The language itself is insanely flexible, which lends itself to extensions that greatly increase its expressiveness. IMO, if you start with Moose (from the CPAN) as part of your "core library" Perl 5 becomes a very powerful tool for writing very nice code, at any scale.

[+] kamaal|8 years ago|reply
Lisp.

Its the most powerful language that has been in existence and yet most modern programmers haven't heard about it or used it.

Almost everything to do with the ecosystem is magic, and its not even a programming language by many a measure, its a thinking paradigm so powerful that it could make many things that look impossible a walk in the park. I've only been learning it for more than a month now, and this is what I've seen.

1. Unmatchable features when it comes to modifying structured data of any kind. Many eons ago our foregeeks seemed to have imagined everything in computer science as either a list or combination of lists on somekind. Tree, Queues, Heaps, Stacks, Vectors, Graphs, Sequences, Sets... You name it, these are all lists or a combination of lists. The programs too are lists(abstract syntax trees). Most modern day data structures you will will deal with XML, JSON, Tables, Matrices are lists or a combination of lists. And lisp is list processing. Once you get a hold of lisp and its paradigm of thought, even difficult algorithms and data structures feel like a walk in the park. I used to struggle with white board coding and algorithm stuff, these day most of it comes to me naturally or little work, when I think of it in terms of lisp paradigm.

2. Recursion: For some reason, its very easy to think recursively in lisp. And that makes very easy to represent hard solutions.

3. Functional programming: Full functional programming features, no holds barred.

4. REPL: If you haven't used the Lisp REPL, you haven't seen a real REPL yet. I was completely blown away by the REPL. Combination of Emacs + SLIME is just too good. And you can hot swap code by attaching to a live process. Which is totally insane.

4. Continuations: Makes it very easy to express a variety backtracking problems.

5. Macros: Ability to extend and add any language feature and paradigm you want, at compile time at 0 costs. And anything you add becomes a part of the language.

6. Libraries: Most lisps these days have libraries for most of the needs.

7. Books: Lisp easily has the most eccentric, fun and enlightening books in all of CS history.

When you code in lisp it feels you are dropping tiny little recursive functions all over the place which grow like a small organism to a very intelligent being.

This is closest I have to come to programming Nirvana so far. The last time before this was when I used Perl.

[+] protomyth|8 years ago|reply
NewtonScript was certainly underrated. Its use of frames with persistence (Soup) with queries was eye opening. I also loved the ease of UI development due to a proper prototype-based framework.

A further development of F-Script should have been the successor to Objective-C instead of Swift. It was fun and its APL influences really complemented the Objectice-C / Smalltalk collections. It also respected Objective-C conventions.