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

I'd love to have a modern statically typed language with type inferencing etc. that can be used for scripting, working in a REPL, as well as compiling to native code.

I've never tried Swift, but it seems it could have all the required features. I guess it's just lacking a lot of libraries that work on Linux.



OCaml fits the bill.


Yeah, or Haskell.

But those have been out there in a more or less mature form for decades, with no major uptake in sight. I guess they're just too esoteric for them to reach critical mass. So here I am, stuck with bash/python/C, and dabbling a bit with Rust..


If you would like to work in finance or compiler development, there is enough uptake of ML derived languages.


OCaml definitely has some weirdness that come from its age though (char==byte thing for example.)


Yeah there are some quirks, but that wasn't part of OP's request.


Well, I did specify "modern", which arguably includes sane Unicode handling.

I think a reasonable compromise is to have "char" be a 32 bit type, whereas a "string" would be UTF8.


Not sure if I would call string handling in Swift sane, but to each its own.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: