3 ms·
It's a hybrid OO-FP language that is statically typed with decent type inference. This has never been done before. Perl is not statically typed. You might thin
by joshhart 15y ago
It's a hybrid OO-FP language that is statically typed with decent type inference. This has never been done before.
Perl is not statically typed. You might think that's a good thing, but I don't because I routinely refactor in a large code base. I can make one change and start propagating it around until everything compiles and unless I've made a mistake it will all work. I don't make very many mistakes so I can improve a code base at rapid speed.
- peteretep 15y agoOK, interesting. The research I'm doing as I wait for comments suggests that it's the power of Perl with some of the good parts of Java, and without having to lean on Moose to get decent OO...
- spacemanaki 15y ago> This has never been done before. What about OCaml? I've never used it, but I was under the impression it is sort of OO combined with ISWIM FP. I've been poking about and reading about Standard ML and the module system seems like it supports some quite powerful OO stuff, but I also haven't really wrapped my head around it. I'm a Lisper and I basically don't know what I'm talking about here when it comes to ML and Scala. I do find Scala interesting though.
- chc 15y agoI'm not an expert in either language, but from my expose to the two, it seems to me OCaml is much heavier on the FP than the OO. If you asked me to imagine a FP-OO hybrid language, it would be closer to Scala than OCaml. Scala is both pervasively object-oriented and pervasively functional. Scala's static type system also seems to be quite a bit more sophisticated than OCaml (though its type inference is crippled as a compromise).
- gaius 15y agoAhem, once you have used OCaml, which is a hybrid etc etc, you would never say Scala has decent type inference. I have to annotate my Scala a hell of a lot more than my OCaml to get it to compile. All function arguments for example, whereas OCaml just deals with it with no fuss. I understand this is because Scala can't use Hindley-Milner due to some OO reason or other but still.
- fogus 15y agodue to some OO reason or other Overloading would be that reason.
- mietek 15y agoNemerle is also a hybrid OO-FP, statically typed language, with subtyping-savvy type inference, targeting the CLI. Moreover, it allows metaprogramming using Lisp-style macros. Nemerle has been available at least since 2005, but I can't blame you for not being aware of it. I probably wouldn't have heard about it, had I not attended the university where it was invented. Check it out: http://en.wikipedia.org/wiki/Nemerle http://en.wikipedia.org/wiki/Nemerle
- deleted 15y ago[deleted]