Hacker News new | past | comments | ask | show | jobs | submit login

Too bad that there is not more effort on Scala.NET instead of this. Lots of people are comfortable with writing Javascript in the browser so all of these compilers emitting Javascript end up being little more than a technology demo. But Scala on the .NET vm would really fill a gap.



I used to wish for this also. But then I found C# to be pretty good; maybe it doesn't have as many features as Scala, but it is definitely a step up from Java.

The demand for Scala on .NET just doesn't seem to be that large, couple with the fact that reified generics make encoding Scala directly kind of difficult (Nikolay Mihaylov spent a lot of time on that).


>> But then I found C# to be pretty good; maybe it doesn't have as many features as Scala, but it is definitely a step up from Java.

I left C# to do Java, Java is a step up from C#.


How so? I started out in Java, then did a lot of Scala for a couple of years, and have been mainly working in C# for the last 6 years afterwards. The only things I miss from Java are anonymous inner classes and some of the better debugging features (hot code replace) that Visual Studio hasn't really matched yet (edit and continue is not as robust).

I miss many things from Scala in comparison, but C# has some good features that almost make up for it.


What niche do you see Scala filling on .NET that isn't already handled by F#?

Case in point, .NET already has FunScript, an F#-to-JS compiler: http://funscript.info/

FunScript also provides a way to do strongly-typed interop with TypeScript, via F#'s type providers.


F# is primarily functional, Scala is much more of a hybrid of both OO and FP; so Scala has things like traits that are actually advanced OOP constructs, while F# tries to push you more in the direction of pure FP.

The tradeoffs are different also. F# focuses a lot on performance in the spirit of Caml, whereas Scala is a bit more free to dive into more powerful features that go against that spirit. This is my grock at least of my conversations with Don and Martin over lunch when Don was doing his sabbatical at EFPL.


Why would you need anything on .net which already runs on the JVM? Is there any platform where you can install .net but not the JVM? Or does .net have a significantly better performance than the JVM?


Imagine a polyglot project where some major .Net libraries are already in use, but ongoing development or integration was done in Scala.

I'm not saying it's a good idea, but there's a use case there.


Wouldn't it be a direct competitor for F# then instead of "filling the gap"? Scala has some more features, but the idea of fast and expressive functional-oop language is basically the same for both of them.

Also, F# was there first, has very good support in IDEs, integration with core .NET, etc. I think Scala would have a rather hard time on CLR (I may be biased, I don't know Scala very much and I worked with OCaml long before F# happened).


IIRC, Scala.NET was basically killed by the fact that .NET reified generics and Scala's generics are pretty fundamentally incompatible, which means a .NET implementation of Scala would either not be very Scala or not have a good .NET interop story.


Why would you need Scala on .NET when you have F# and C# that are completely the same thing.


Scala integrates OOP and FP in a truly elegant way, F# is mostly FP with some OO bolted on it as an afterthought, and C# is much closer to Java than to Scala. You may argue whether Scala is really more expressive than F# (IMHO it is), but regardless of it, they are not the same thing.


F# doesn't have "OO bolted on it as an afterthought". Sure, F# strongly favors the FP approach to things, but the language's OO features are important -- critical, even. Without support for OO programming, F# wouldn't be able to easily consume existing .NET (C#, VB.NET, etc.) libraries, nor would you be able to use F# to implement components/libraries to be easy consumed by C#. The ease of interop'ing with C# is one of F#'s best features, IMO, and an important part of the wider adoption it's now seeing.


Neither F# nor C# are "completely the same thing" as Scala.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: