6 ms·
As a Java and JVM focused developer the openning up of .NET really excites me. First, because .NET is a fantastic framework in and of itself, but also because t
by meddlepal 12y ago
As a Java and JVM focused developer the openning up of .NET really excites me. First, because .NET is a fantastic framework in and of itself, but also because this hopefully will encourage Oracle to be faster and more competitive with Java features and improvements.
- Someone1234 12y agoI know what I am about to say is both heresy and insanity, but maybe we could get a C# implementation that compiles to the JVM? I mean, yes, C# has been largely open-sourced already. But with the new compiler framework being opened up also it seems imaginable that someone could write a version that spits out Bytecode instead of MSIL. I have nothing against the JVM, but am not a huge fan of the Java language (and also how the Java libraries have been forced to be developed due to limitations within Java the language). Yes Java 8 made Java much MUCH better than before, but just because Java 8 is a around doesn't mean all the libraries and other underpinnings got magically updated overnight.
- runT1ME 12y agoScala does everything C# does and a lot more. I'm a big C# fan but we're doing new development in scala and even porting some of our C# code over.
- venomsnake 12y agoMost languages give you enough rope to hang your self with. Scala gives you options to choose brand, width and color from a wide selection. The flexibility of Scala was scary when I started.
- pjmlp 12y agoHowever C# is the official .NET systems language, while Scala is a third party language. This already rules it out from our projects, due to the way our customers manage their IT stacks and development environments. So I don't need to ask permission to several IT departments to have C# on our projects, but I do need to do it for Scala.
- frowaway001 12y agoMaybe you are just working for the wrong customers/company. I decided to never do Java again, and until now I have zero complaints, because I have plenty of offers to pick from.
- pjmlp 12y agoWhat matters is what makes the customer happy. Anyone that wants to bring something new to our projects needs to prove what is the business value. If it reasonable, it gets adopted. So for Scala to be adopted on our projects, customers need to be convinced what is the business value of having their multi-site team learning it, instead of us using their already installed infrastructure. I can dabble in alternative programming languages on my hobby projects.
- frowaway001 12y agoWell, I guess the difference is that I'm not the one who brings up Scala, it's the customers.
- pjmlp 12y agoGlad to see it working then.
- CmonDev 12y agoDoes Scala do something like Xamarin? Single code base => iPhone, Android, WP, mainstream game consoles, Mac, Linux? It's not about just language.
- zastrowm 12y agoOne of the primary problems with this is generics (java/JVM uses type erasure, CLR/C# keeps type information) and value types (CLR/C# has them, JVM does not); That's why you can implement the JVM on the CLR (see IKVM.NET[1]), but not the other way around. [1]: http://en.wikipedia.org/wiki/IKVM.NET http://en.wikipedia.org/wiki/IKVM.NET
- meddlepal 12y agoI'm not a vm or compiler expert by any means but Gosu and Ceylon have implemented reified generics on the JVM somehow. It seems possible, but I don't know what the performance impact would be.
- gsnedders 12y agoWell it's obviously doable — both the JVM and CLR are equivalent to Turing machines, so it follows that they can run the same set of programs. It just, uh, might be non-trivial. :)
- meddlepal 12y agoFwiw, when Gavin King (Ceylon) did a AMA on Reddit a while back I asked about how they implemented reified generics on the JVM: https://www.reddit.com/r/programming/comments/2iszra/ceylon_11_is_now_available/cl5vp6x https://www.reddit.com/r/programming/comments/2iszra/ceylon_...
- Gurkenmaster 12y agoCeylon is a great language in my opinion. I would rather programm in Ceylon than in C#.
- meddlepal 12y agoThat's good to hear! I haven't played with it yet beyond flipping through the docs. Have you built any production ready apps or libraries in it? How was the transition from writing Java? Did anything cause you pain or surprise?
- emjaygee 12y agoIt would be super difficult to represent value types, generics and the reflection metadata in the JVM without building some kind of giant abstraction layer. MSIL is rich, maybe overly rich. If you get rid of value types and generics from C# you're basically left with ... Java.
- nickik 12y agoWatch this awesome keynote by Brian Goetz, he talks about valie types and generics. Brian Goetz - Stewardship: the Sobering Parts http://m.youtube.com/watch?v=2y5Pv4yN0b0 http://m.youtube.com/watch?v=2y5Pv4yN0b0
- Gurkenmaster 12y agoNot quite. There are still some features that are not possible on the jvm like async/await.
- noblethrasher 12y agoSince the CLR was designed to be hosted, I don't see why someone just doesn't make a CLR host that runs in/on the JVM, similar to something like SQL-CLR.
- oscargrouch 12y agoOut of curiosity.. Who would want that? What we would be achieving with this?
- pjmlp 12y agoDB Servers for example. You can write stored procedures in .NET and Java instead of the engine's own language. Or extend the engine with new functions. Most of the commercial SQL servers allow this.
- oscargrouch 12y agoI know you can do this, but it would be a bad idea anyway, to support two different IL's instead of just one.. One way to solve something like this, with much less effort and elegance, would be to make both langs output LLVM IR for instance, and jit the native binary from there.. Thats my point, i cant think in any way something like this would be a good idea, given the ammount of resources needed to do something like this for trivial results that would not payoff the efforts. There is only one scenario that this would make sense, and its on Android, given it is tied to a jit runtime engine, but then , they could just drop CIL and compile from source in a intermediate their runtime would understand, the same one's java is already using.. so again.. no luck with that effort
- pjmlp 12y agoJust to give one example, Oracle allows this for ages, so it is something real not an idea.
- andyjohnson0 12y agoIs the JVM designed to host other runtimes?
- pron 12y agoWe already have that, and it's called Kotlin.
- j_s 12y agoMainsoft did this back in the day; not sure how up-to-date their Grasshopper solution is. http://dev.mainsoft.com/Default.aspx?tabid=29#top_Licensing http://dev.mainsoft.com/Default.aspx?tabid=29#top_Licensing
- debacle 12y ago> Oracle to be faster and more competitive with Java features and improvements. Please don't hold your breath. Millions of programmers die every year from hope-influenced asphyxiation.
- IndianAstronaut 12y agoI'm still waiting for everyone to move to Python 3.
- CmonDev 12y agoThere is a difference between change mismanagement and not willing to invest in language development.
- thorin 12y agoI'm not sure that's fair. Java 7 and 8 have made some great improvements. The release cycle is fairly frequent and it's actually possible to migrate software easily enough unlike the python 2.7->3 standoff.