Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Powerful static OO orientated multi paradigm alternatives to Scala

Tags:

oop

static

scala

I wondered if there are any alternatives to Scala that attempt to offer a more powerful type system and syntax. I'm aware of functional alternatives such as Haskell, but are there any are really pushing the static OO side of things, for example in such areas, where Scala is lacking such as virtual classes, full multiple inheritance and more flexible constructor syntax, static contract checking, more powerful path dependence, MyTypes, friend modifier, first class imports, or maybe some esoteric typing tool, I haven't even thought of / heard of.

OO and to lesser extent Static do not seem to be fashionable these days. However, it strikes me that the power of modern computers enable the creation of static compilers way beyond the dreams of compiler writers in previous decades.

I presume as I haven't come across anything, there's no alternative that I'm likely to want to knock out production code in any time soon. But even if they're still very much academic languages, I'd still like to keep an eye on them and maybe play around with them. I'm particularly looking for what might be called left field alternatives to Scala. So not Ceylon or Kotlin that are trying to prioritise simplicity over power. Eiffel doesn't seem to be going anywhere these days. I've come across gBeta and Ceasar but haven't been able to work out if there are any areas where they lose out to Scala. Are there any other possibilities?

like image 324
Rich Oliver Avatar asked Jun 18 '12 11:06

Rich Oliver


1 Answers

In a word, no. There are no popular OO alternatives that come anywhere close to Scala's type system. Given your desired features, I'd suggest you take a hard look at C++, D, and Go.

If you're feeling adventurous and you aren't completely attached to the idea of OO, then take a look at Typed Racket. Coq, Idris, and Agda offer dependently typed goodies that are quite intriguing. Or just turn to popular FP languages like Haskell, F#, and OCaml.

Is there any particular reason you want an OO language? Again, Scala is probably as good as it gets right now if you want a cool type system and OO.

like image 151
Dan Burton Avatar answered Sep 29 '22 06:09

Dan Burton