7 ms·
Serious question: Isn't Java still one of the default languages if you are choosing a "safe" language to build and maintain a large piece of software? Consideri
by ellard 8y ago
Serious question: Isn't Java still one of the default languages if you are choosing a "safe" language to build and maintain a large piece of software? Considering how long it's been around and how many libraries exist for it now, i've generally viewed it as a language that's:
- fast enough for most things without a lot of pitfalls/gotchas
- easy enough to read for most developers
- easy enough for most developers to pick up if they've never used it, even if they aren't exactly enthused by the idea of doing so
- supported enough that you'll never be the only person who is debugging something
- widely used enough to never be alone when you are trying to use it in unsupported ways
- has commercial support from multiple companies
Basically all the things that a lot of "enterprise" companies love.
Edit: formatting
- wongarsu 8y agoAll of those points are also true for C#, which imho fixes a lot of Java's problems and is a much nicer language. With .Net Core maturing you even get the "runs everywhere" factor (at least everywhere you care about, i.e. Win+Linux+Mac), and Microsoft is a much better vendor than Oracle.
- evil-olive 8y agoI'm very happy to see .NET Core getting more stable and mainstream (I miss my days of working in C# even though I don't miss Windows) but I think running it on Linux for backend microservices still counts as fairly off-the-beaten-path compared to the safe, "no one ever got fired for doing X" choice of using plain ol' Java.
- cafebabbe 8y agoYes, albeit with noticeably weaker libraries/ecosystem.
- threeseed 8y agoYou can still have a more modern language i.e. Scala, Kotlin on the JVM whilst not abandoning the unparalleled array of libraries that the Java ecosystem offers.
- deleted 8y ago[deleted]
- pjmlp 8y agoAs someone that works with both stacks since their inception, there are tons of platforms with Java compilers, where .NET Core isn't even a thing today, and there are tons of .NET libraries that will never leave .NET Framework. So it isn't like just exchanging one for the other like that.
- james_s_tayler 8y agoI'm finding library support quite good for .NET Core tbh. Not perfect, but it's not at all a barrier to adoption.
- pjmlp 8y agoTry to port any commercial component library to it like Telerik and friends, ODP.NET, WCF, EF 6, Forms, WPF. .NET Core 3.0 will fix some of the compatibility issues but not all of them, for example EF 6 will only be partially supported (VS DB tooling is not being updated for Core).
- james_s_tayler 8y agoYeah .NET Core 3.0 will address some of that, not all. I suppose for any brownfield development looking at switching across those things are the potential blockers at the moment. Especially things running EF where EF Core doesn't have a particular feature just yet. But EF Core development is cracking on at a good pace. Telerik and the likes I'm not so fussed about personally. I suppose DevExpress is another one on that list. I think front end component libraries like Prime-ng/PrimeReact are probably the way to go for the future of UI development for Line of Business applications. Overall I reckon in a couple of years there won't be much of those blockers left at all.
- iGoog 8y agoI gotta ask what in particular "problems" C# solves over Java, and I'm not talking about J2SE 1.4. Having dipped into C#, it feels like the designers resented OOP and reusable code. C# is not the new kid on the block and is almost 20 years old now.
- throwawayEntDev 8y agoOver that 20 years, C# has been continuously improved with language features added at a faster rate than Java. Some examples: * properties * LINQ * async/await * dynamic types * better generics * inferred typing - `var` * null conditional operators * custom iterators - `yield` * pattern matching Also, .net is more of a “pit of success” language — Java with all its legacy baggage requires a lot more knowledge to avoid mistakes.
- iGoog 8y agoso... properties that require a steeper learning curve, a system that's worse far worse than JPA+Spring Data (or you could use the hibernate in both languages - a java development), another word for var/let, I'd disagree about generics, var/let again, I wonder what rust devs would say about these null inline conditionals that require more knowledge, and... yield is actually neat if also not another non-traditional baggage thing to learn. Anyhow, I guess my take is that Rust is a better language than C# in all the ways that C# might be better than Java and more... Except that C# is a lot like Java and is the language of choice if you use Unity - so it does have a big awesome ugly library that Java does not have. Really we should feel sorry about all the Unity baggage C# devs get to deal with. Then there's Microsoft land, which has not inspired me of code quality and can't get out of VB think.
- scarface74 8y agoHibernate is an ORM. LINQ is just what the name says it is language integrated query. Linq is understood by the compiler, translated into expression trees at run time and then any third party provider can translate it to the destination language. You can pass Hibernate expressions around and depending on context, they can get translated to regular IL when working with Lists, Sql when working with RDMSs or MongoQuery when working with Mongo, etc.
- meddlepal 8y agoThe problem with C#, which I think is a fine language, is the small(ish) size of the ecosystem and the refusal of the ecosystem to deviate away from non-MS endorsed libraries and frameworks. It's the ridiculously large JVM ecosystem that makes Java awesome, not the language.
- james_s_tayler 8y agoYeah, I definitely feel this some days. I've just moved over to C# from Java because I'm bearish on Oracle as a vendor in general, I find C# great and impressed with Microsoft's efforts as a vendor with what they've done with .NET Core. I have love for Java, but I gotta say it mostly is because the ecosystem is pretty fantastic. So much open source stuff for so long means it's all just there and it all just works. There are some gaps though. .NET ecosystem isn't bad. It's pretty good. There are some phenomenal libraries. But sometimes the gaps are painful. The lack of an open source (read FREE) integration framework is a big one for me. There is BizTalk but that's commercial and probably expensive. Same with scheduling libraries. HangFire looks great but it's paid. A lot of the really high quality stuff you have to shell out for which when you're just hacking in your own time is not feasible. That being said there are open source libraries and some of them aren't bad. Lots of great stuff in general.
- spricket 8y agoCompletely agree, except that MS was so crazy hostile to OSS that they scared off all the serious guys a decade ago. I wish them the best. The CLR has some compelling features that make it objectively better than JVM on so many levels. But the lack of ecosystem is killing them. And has been forever. The new MS CEO is great in my mind but it will take many years to turn the ship around. Devs don't forget. Best example I can think of (was a C# guy for years). Resharper has been around forever. But it costs a lot. This is par the course for C#. I can get the same thing in Java by pulling in a few linters with Maven, and it's all free. Because MS scared away everyone that was afraid of licensing fees (ie most academics, the sharpest devs out there), there's nothing comparable. Same with C# port of Quartz and so many others. They killed off the real rockstars among us that create the majority of libraries that everyone else uses. Can it be fixed? I hope so. The CLR is great and Oracle sucks. But for now there's a good reason Java is dominant
- scarface74 8y agoResharper is $139 a year for a personal license and the price goes down 20% after the first year and 40% year after that. You can also pay monthly. They also have a perpetual license. If you cancel after the first year, you can keep using the version that was current 12 months ago. But the one thing missing in Java is anything like LINQ. I don’t mean the syntax I am referring to the idea of LINQ -> expression trees -> third party providers that translate LINQ to another language (sql, Mongo Query, etc.).
- spricket 8y agoIt's not built in to the language, but JOOQ and QueryDSL come fairly close. I do miss LINQ though. The Java options are all clunkier because the type system isn't nearly as flexible
- scarface74 8y agoI can't tell from looking at the examples, but can I do things like pass around arbitrary expressions: Person.Get(p => (p.Age > 65 && p.Sex == "M") || (p.Age > 63 && p.Sex == "F")) and have a method public List<Person> Get(Expression<Func<Person,bool>> expression) and have that expression interpreted correctly at run time by separate providers? You get full compile time checking and IDE supported autocomplete.
- yazr 8y ago> Isn't Java still one of the default languages ? Yes. There is no need to engage the GP - let him rant about Go and JS. Java is still huge, for both legacy and new projects. For context - I started as a C/Kernel dev. I also spent 2 years with Java on mission critical backend code. Both have their uses.
- ilovecaching 8y ago> For context - I started as a C/Kernel dev. So you have a very limited view on what sane development looks like. I assume this is just name dropping. > I also spent 2 years with Java on mission critical backend code. I feel bad for the people that will have to keep that code running. Because my point is that there are now better choices.
- kickopotomus 8y agoAre you familiar with the term "Magpie Developer"[0]? Your claim of "better choices" is highly subjective. To me, every point that ellard brought up makes Java "better" than JS or Go. [0]: https://blog.codinghorror.com/the-magpie-developer/ https://blog.codinghorror.com/the-magpie-developer/
- dang 8y agoPersonal attacks aren't allowed here and we ban accounts that do that. If you'd please review https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html and follow the rules when posting in the future, we'd be grateful.
- deleted 8y ago[deleted]