Hacker News new | ask | show | jobs
by strictfp 1367 days ago
This sounds very similar to how Jetbrains tried to improve on Java but in the end deciding to invent Kotlin; a new language with more consise syntax, better defaults, some new features, and great interop back and forth with Java.
2 comments

> great interop back and forth with Java.

That's something all JVM languages share. Not that easy with compiled languages unfortunately.

No, Kotlin's goal was great interop from the start. Clojure and Scala have better interop with Java than, say, Rust with C++, but it's often painful to consume Java libs from them and consuming Clojure of Scala libs from Java is not a thing in practice.
Great interop only when calling Java from Kotlin, good luck doing it the other way, specially with co-routines.
C++ needs a new frontend. Something close to C# / Kotlin
Google is trying to do something like that with their new Carbon language.

https://github.com/carbon-language/carbon-lang

C++ doesn't really have a "backend" like the JVM does; its ABI is already too weak to be used across shared libraries. So there's not as much need to mix a new language with existing C++.

Worse, because C++ libraries are gigantic header files, you have to support 100% of the language to use them.

It's still possible, and it has been done before. One of the most amazing examples is Clasp [0] - a Common Lisp implementation that is able to fully interop with C++, including template code and exceptions. And it's led by a Chemistry PhD - I'm sure someone like Herb Sutter can run miles around him in programming expertise.

[0] https://www.cliki.net/Clasp