HACKER Q&A
📣 akkad33

Is there a language that is simple and empowers developer productivity?


I think many languages tried to be "simple", but in the process they also handicapped developers by removing useful features like generics and operator overloading. I'm thinking Java, Go, etc. Is there a language that actually is simple, but also is expressive while also remaining correct, with a reliable type system with no holes? I would not say Rust, D etc are simple, even though they allow enormous flexibility


  👤 exasperaited Accepted Answer ✓
There’s no simple language that has generics, operator overloading and a type system because these are not simple concepts.

That’s OK, surely?

There are older languages that are simple, typed and powerful like Ada and Modula-2, but these have fallen out of favour because the world wants operator overloading and complex type definition languages and generics.

(The lack of a Modula-2 sort of language is IMO ably addressed by Go)


👤 PaulHoule
Kotlin?

👤 linguae
I’m reminded of Standard ML (note that this has nothing to do with machine learning). It is a simple language with a powerful static type system, and while it is a functional programming language, it permits impure operations such as mutability. Standard ML is more complex than Scheme (which is dynamically typed), but is simpler than its cousin OCaml (which is more feature-rich), Common Lisp, or Haskell. I think Standard ML is a nice combination of power, simplicity, and static typing.

https://www.smlnj.org/index.html


👤 jonahbenton
There is no reliable type system with no holes, because there are no humans who can generate a hole free collection of orthogonal types.

For simple, there is always Clojure. Uses predicates rather than declarative types.