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

Is there a Python with Haskell syntax (or at least, much less verbose than regular Python..) that can have little a Haskell static typing, as a treat?


Nothing comes to mind. Most attempts to introduce static typing into Python only do that, and not much more. Seq is an example:

https://github.com/seq-lang/seq

I think you might be interested in looking at multi-paradigm languages that use static/inferred typing and combine the functional and imperative paradigms. Some worth taking a look at might be OCaml, Nim, and F Sharp. Nim leans more towards Python, OCaml and F# lean more towards Haskell.

https://en.wikipedia.org/wiki/OCaml

https://en.wikipedia.org/wiki/Nim_(programming_language)

https://en.wikipedia.org/wiki/F_Sharp_(programming_language)


Ocaml is really good with nice tooling like merlin. Compiles to native as well. There's reasonml for people who favour js syntax but I have come to like ocaml syntax.


Scala is also definitely worth checking out https://www.scala-lang.org/


There's Coconut (https://github.com/evhub/coconut), which is a functional extension of Python 3 that compiles to Python 2 or 3.

The case studies here can show you the syntax: https://coconut.readthedocs.io/en/master/HELP.html

And the site has a good summary of some of the features over vanilla Python: http://coconut-lang.org/



Is that not Just ML? Hindley-Milner functional but much more pragmatic when it comes to stateful programming?




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

Search: