11 ms·
No thanks. I like Java, and esp Java 8 just fine.
by treehau5 10y ago
No thanks. I like Java, and esp Java 8 just fine.
- kentosi 10y agoOr have both. What's in Java 8 that isn't in C#? And last I checked you couldn't use Java 8 fully on Android (please correct me if I'm wrong).
- johncolanduoni 10y agoYou are painfully correct...
- daxfohl 10y agoAnonymous classes are the big thing I miss. (Yes C# has a feature called "anonymous classes" as well, but it's completely different).
- TheCoelacanth 10y agoWhat do you still use those for? I can't remember the last time I saw an anonymous class used in a way that isn't superseded by lambdas.
- daxfohl 10y agoYeah, I was thinking about that when I wrote the comment. They were most useful for `Observable` objects for event handling in swing; you don't really need that with C# events. There are still uses though. Lambdas are the future, but there are lots of OO-first libraries that are still quite popular. It'd be nice to create e.g. `new Newtonsoft.JsonConverter() { ReadJson() {...} WriteJson() {...}}` etc on the fly sometimes without needing separate classes. It's possible in F# though, so nothing dotnet specific is preventing it.
- jdmichal 10y agoI use them all the time for defining singleton implementations. public static final MyInterface SINGLETON = new MyInterface() { ... }
- adzm 10y agoIf only we could run IL on the JVM
- xorxornop 10y agoValue types. Reified generics.
- ckarmann 10y agoJava enums are the one thing that I miss in other languages.
- jdmichal 10y agoIn my experience, C# can be coded almost exactly like Java 8; just ignore the extra features C# has. (I don't know why you would, but it's certainly possible.) Do you have more specific complaints?
- cptskippy 10y agoPlumtree Portal / BEA Aqualogic Interaction / Oracle WebCenter documentation is/was a perfect example of this. When I was working on it, all of their code samples had a footnote that said something like "all code examples work in Java or C# unless otherwise noted". I don't recall ever coming across a language specific example.
- baldfat 10y agoWhy would someone down vote an opinion that they are okay with Java? It added to the conversation. Personally I prefer C# and Swift to Java but others idea are just as valid.
- bengale 10y agoIt was probably more the 'no thanks'. Got mine sort of mentality, two can co-exist.
- mikestew 10y agoThe implication is "I have no interest in this because I'm happy with what I have". Okay, that's fine, please enjoy your Java and build wonderful things. Oh, BTW, why are you typing into a reply box on a thread you have no interest in? And the implication there is because your tool is a poopy head and I wanted to subtly point that out by expressing my lack of interest. So, yeah, go away because that's not contributing to the conversation.
- kuschku 10y ago> So, yeah, go away because that's not contributing to the conversation. Well, maybe there’s another implication. Google switching to C# would lead to them neglecting and deprecating the Java ecosystem on Android. That’s gonna be real ugly for app devs, ending up having to rewrite everything. So, maybe, there is a real contribution in the comment, which you just haven’t seen yet?
- lagadu 10y agoI don't think anyone is suggesting Google should drop Java, just that C# should be made a first class citizen, side-by-side with Java.
- kuschku 10y agoYet, that’s what’d happen. Google hasn’t even managed to support C++ alongside of Java as first class citizen, adding yet another one would make the situation even worse.
- usrusr 10y agoI like Java too and it's a shame we are limited to some weird bastardization of different source levels on Android. A credible threat of Google moving Android away from Java is the best hope we have of this situation ever improving.
- ygra 10y agoWell, it could be worse. At least the standard library is there, as opposed to GWT (where you pretty much cannot use any Java library at all).
- olavgg 10y agoI also think Java is fine. Compared to C#, I find Java code easier to read as there is less magic. I also use Groovy for some corner cases like for example JDBC stuff or metaprogramming. I'm also a big fan of Maven and the development tools for Java, and most importantly the eco-system with rich libraries and frameworks. Is there an alternative for JRebel or Spring-loaded for C# yet?
- mattmanser 10y agoWhat magic are you talking about? Various .Net frameworks have silly amounts of magic, but C# itself?
- jrudolph 10y agoSilly amounts of magic? Ever looked at a Java Spring project?!
- hacktothefuture 10y agoTHIS!
- blauditore 10y agoWhen I started going into C# from Java a bit, there were two things slightly annoying me: - Class extensions: I saw code examples online that just wouldn't work for me because the compiler told me a certain method of a built-in class wouldn't exist. After I while I found out that the author of that snippet had used class extensions and not bothered to mention. - The var keyword: While this is sometimes nice for quick scripting or hacking in the debugger console, it opens the door for hard-to-read code. Those are not necessarily "magic", but potential obscurities that can't happen in Java, simply because Java lacks these features.
- samfisher83 10y agoIf you have visual studio it tells you what the var is.
- samfisher83 10y agoC# and java are very similar except C# has a bunch of extra features. Instead of creating anonymous classes and overriding methods you use event handlers. Plus you have linq,lambdas, operator overloading etc.
- kuschku 10y agoThere’s also the Stream API and lambdas in Java. Operator overloading is probably the worst feature ever invented, same with Class Extensions, reducing readability of code. And with a switch to C# Google would neglect the Java ecosystem on Android, requiring us app devs to rewrite everything again. I’m not sure there’s an upside to switching to C#.
- recursive 10y agoIMO operator overloading is less bad than goto. (C# has them both) C# also has yield, async, structs, reflection on generics, and a number of other features.
- samfisher83 10y agoI think using goto when breaking multiple loops is useful.At least you know where the next line will be.
- recursive 10y agoThere are reasonable applications for goto. But I think there are more reasonable applications for operator overloading. (like Complex, BigInteger, or dimensional types)
- jaegerpicker 10y agoLambda's are horrid on Java compared to C# IMO. Class extensions can be fantastic and really enable design elements in elegant ways, any advanced feature could be argued that it reduces readability if used poorly.
- 10y ago
- jaegerpicker 10y agoNot attacking you opinion at all but I'm a little shocked that someone would have this opinion, I work at a Java shop (using java 8 but I'm mostly now on the node.js side). Java 8 really doesn't have any features that are better than C#'s. Java 8 is missing some pretty major ones, like type inference, automatic getters/setters, LINQ, function passing support that's not brain dead, and a number of of things that make dev life SO much better.
- aembleton 10y agoI agree which is why I've moved my Android development to Kotlin. It provides a lot of that and works right now on Android
- jaegerpicker 10y agoWe are doing the exact same thing for our Android development. Kotlin for Android and Swift for iOS.
- monksy 10y agoWhich is why you would use Scala or Groovy.
- jaegerpicker 10y agoOr Kotlin but that's not his argument. He's arguing for Java 8. I don't agree that Java 8 is really an acceptable modern language for development. IMO it's painful and god awful slow develop in compared to a host of better languages (Swift, Scala, Groovy, and C# all included but not limited to).
- vorg 10y ago> develop in compared to a host of better languages (Swift, Scala, Groovy, and C# all included Swift, Scala, and C# are statically-typed languages, like Java, whereas Apache Groovy is dynamically-typed originally -- though static typing was added in Groovy 2, virtually no-one uses it. Dynamically typed languages like Groovy are good for glue code, build scripts, and testing, not for developing actual systems.