Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A programming language with Python-like syntax and a Hindley-Milner type system plus typeclasses. Basically, we bring Haskell’s type system an imperative programming language. An easy-to-learn scripting language with a strong, sound type system with reliable type inference will reduce bugs in codebases of every size across the industry.


Have you given Raku (fka Perl 6) a try? It seems its roles[1] resemble Haskell's typeclasses, and it borrows heavily lots of good features found in other languages.

Disclaimer: I haven't used either language, just learned about Raku recently from this[2] excellent FOSDEM talk.

[1]: https://docs.raku.org/syntax/role

[2]: https://fosdem.org/2020/schedule/event/rakulang/


Disagree about scripting.

Compile times are fast if you are willing to tradeoff performance. But you can decide whether you whether or not you want a long compile fast program, a short compile slow program, or an interactive compiler.

The example I can give is StandardML. You have SML/NJ and MLTon as two possible compilation options among other. SML/NJ has an interactive mode. MLTon compiles for longer but results in faster programs. (And it's also Hindley-Milner)

Just going to the "it should be interpretable" route without there being any option for whole-program optimization at compile time results in unnecessary bloats in performance which by all means we can avoid now as development hardware has become faster.


Yes, I agree the language should be compiled for performance, types enable compiler optimizations and it would be silly to abandon that benefit. By “scripting language” I mean the syntax will be similar to existing interpreted languages and it will be easy to write small scripts without specifying types since they are inferred.


I think languages which bolt some trait / generic / role system onto an object-oriented system are generally a bit too bloated, non-opinionated, and confusing. Typeclasses not only encourage an elegant separation between data and functions, they allow you to design guarantees about how your functions interact with each other into your program — basically, not only data inheritance but also functional inheritance. Object oriented syntactic sugar is an easy add-on to a typeclassed language, but not the other way around.

Beyond immediately reducing bugs, I think widespread use of this sort of language designed with a good type system from first principles would allow many more programmers to write programs with some provable security guarantees.


I'm not an expert, but that kind of sounds like F# (maybe not the typeclasses though?).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: