DEV Community

Discussion on: Features of a dream programming language

Collapse
 
redbar0n profile image
Magne • Edited

ReScript is the language I've found that seems to most closely fulfill the set of most important familiar features. It has:

  • Functional Programming, but based on data-first piping.
  • Immutability, but w/ somewhat opportunistic in-place mutation.
  • Ecosystem: good interoperability with JavaScript ecosystem.
  • Transpiles to JavaScript.
  • Statically typed (w/ full & sound type inference), but excellent type inference should still allow fast prototyping.

(F# with Fable is another equivalent alternative, if you're into .NET)

Collapse
 
redbar0n profile image
Magne • Edited

What about a soundly typed language that transpiles to Clojure and ClojureScript (which again transpiles to JS)?

It could be based on Subject-Verb-Object syntax, and Data First Functional Programming, with sweet-expressions, written in OCaml, to get sound type inference.

That could get pretty close to the dream...!

Collapse
 
redbar0n profile image
Magne

Typed Clojure is not it... youtu.be/a0gT0syAXsY?t=94

The syntax is a non-starter. It also has only local type inference. The problem might be Clojure's ad-hoc polymorphism complicates things quite a bit... I'd rather have parametric polymorphism ala. OCaml and ReScript.