4 ms·
Super cool stuff. I'm a fan of statically typed languages as a rule, but do python at my job, so this is very relevant to me. I've long thought there should be
by thinkpad20 12y ago
Super cool stuff. I'm a fan of statically typed languages as a rule, but do python at my job, so this is very relevant to me. I've long thought there should be (and have half-assedly attempted to make) a simple, python-like dynamically typed language which supports functional staples such as pattern matching, expression syntax (i.e. no need for explicit return), records and the like. And it has persistent data structures, which are (inexplicably) still missing from python after all these years. Bravo!
The one thing I didn't see, though: lambdas? Is it python syntax for those? Is there support for pattern matching inside of lambdas?
Edit: another user posted this link re: lambdas. https://github.com/i2y/mochi/blob/master/examples/bind.mochi https://github.com/i2y/mochi/blob/master/examples/bind.mochi
- Xixi 12y agoYou should have a look at Elixir. It's a simple, dynamic, functional language running on top of BEAM, the Erlang VM. It recently reached 1.0 and is production ready: http://elixir-lang.org/ http://elixir-lang.org/
- jcbrand 12y agoPython IS dynamically typed. You seem to be confusing the fact that it's strongly typed with statically typed languages. https://wiki.python.org/moin/Why%20is%20Python%20a%20dynamic%20language%20and%20also%20a%20strongly%20typed%20language https://wiki.python.org/moin/Why%20is%20Python%20a%20dynamic...
- thinkpad20 12y agoWhere in my post did I suggest otherwise? I realize I didn't word it the clearest way but I don't think I ever indicated that python was anything but dynamically typed. To be clearer: * I prefer statically typed languages as a rule * However, I do python at my job (which is not statically typed) * there are many features which tend to be found in statically typed functional languages, which I would love to see in a dynamically typed, python-like language.
- CyberDildonics 12y agoYou should take a look at Julia. It does not have pattern matching, but it does have multiple dispatch and pretty much every other functional programming staple. I don't know about persistent data structures but someone may have already done it, or it could be done with macros.
- shele 12y agoHere you go! https://github.com/JuliaLang/FunctionalCollections.jl https://github.com/JuliaLang/FunctionalCollections.jl There is a nice talk by Zach Allaun, of Clojure background, about persistent data structures in julia, http://www.infoq.com/presentations/julia-vectors-maps-sets http://www.infoq.com/presentations/julia-vectors-maps-sets