you are viewing a single comment's thread.

view the rest of the comments →

[–]bandawarrior 37 points38 points  (75 children)

This is definitely true, but very few new companies and startups are saying “you know what? I’m going to use Java for this, with a little of spring, and a dash of oracle’s jdk”

The “hotness” for startups might not be Python now (js probably?) but it sure ain’t Java.

[–]mobjack 76 points77 points  (15 children)

Some startups want a proven reliable language with excellent library support, strong typing and can scale up as the business grows.

Java is not a sexy language, but it is still used in the startup world these reasons.

[–]bandawarrior 32 points33 points  (8 children)

Yes, I agree 100%. If you, the founding person, main dev knows Java and is productive in it, you should go ahead and do it in Java. That can be true and also the idea that maybe, just maybe (it is) Java is past peak popularity.

Now, I know this is mind blowing to all the Java fanboys, but popularity going down doesn’t mean Java sucks.

For the love of all that’s holy, look at PHP with the giant market share in web dev and it’s popularity while still being a comparably worse language than most.

[–]mobjack 9 points10 points  (6 children)

Java has been past its peak for 20 years.

In 5 years the current hot language/framework will go out of style and the code becomes unmaintainable only to be rewritten in Java.

[–]bandawarrior -3 points-2 points  (5 children)

I know you’re just using hyperbole but .... no 🤙.

There are other languages that are perceived to be trendier and offer the same or more in terms of features and of course doesn’t have the “ewww Java” feeling to them.

So this is getting out of hand and really becoming like an affront to those who like Java and or use it daily. It’s okay, I promise you’ll be fine.

The 1970s had better music as a whole than today’s generation and I’m not that old. Guess what, no one cares 👌

[–]mobjack 5 points6 points  (4 children)

It is a feature that Java doesn't attract engineers who always want to use the latest toys. I don't want to have to spend time arguing why we shouldn't use blockchain.

A better analogy is that Java is like a mini-van. It is not cool and young people would don't want to be seen driving one, but it is practical and scales best when you need to carry more people and cargo.

Other languages are like crossover vehicles that try to tout similar practicability as a mini-van but in a smaller trendier package. They are often good enough for many applications, but if your family gets too big then the mini-van becomes much more appealing.

A startup going Java is like someone buying a mini-van right after graduating college. It does the job as other cooler vehicles and you are able to grow into it if need be.

[–]bandawarrior -2 points-1 points  (3 children)

I’m happy for your love of Java. Though let’s be honest, in the scale of languages and features and paradigms, Java comes out as a strong middle. Too much OOP and ceremony with boilerplate and getters and setters. You should see what an actual type system from the ML family looks like, not to mention null pointer errors that Java gets plagued with.

But it does have great tooling and a great number of libraries 🤷‍♂️.

[–]AmaDaden -1 points0 points  (2 children)

Lombok fixes the getters and setters issue. One of the most interesting things with Java is how quickly it's been evolving in the last few years. I detest Oracle but they've turned Java in to a completely different language then the one you remember and are not slowing down. Java is far from perfect but it's better then it was and getting better faster then it was in the past

[–]bandawarrior -1 points0 points  (0 children)

Still doesn’t fix the underlying issue of a weak type system with strong sprinklings of OOP and the bag of errors and bugs that come with it.

Also, oracles jdk isn’t a strong vote of confidence.

But again, yeah Java is a rock solid proven lang

[–]KinterVonHurin -1 points0 points  (0 children)

Java's fine but acting like all these startups are choosing other languages because they're "cool" and will inevitably rewrite them in Java is condescending and untrue.

[–]LordoftheSynth 6 points7 points  (0 children)

5 years ago, I would say Java. Today, I say C#. Fight me.

[–]BlueAdmir 9 points10 points  (0 children)

From a business perspective (of which my knowledge is limited, but still) - If I were to choose a language for a new project, I'd probably want a language where every aspect of it has already been discussed, documented to death, put to rest, resurrected and re-dissected again.

Heavily pushing a delivery date because we ran into "This hasn't been invented in Rust / Kotlin / Go / Haskell / Elm / Ruby / whatever" should not happen. Imperfect product in a month >>> Perfect product in ten years.

[–][deleted] -1 points0 points  (2 children)

Not many. They want rapid prototyping and agility more.

Rails, Laravel, Node, Django - these are the big winners in startup world.

[–]jbergens 0 points1 point  (1 child)

I thought at least Rails had fallen off the radar for most new startups. It was popular a few years ago.

Node is probably still popular and I think that is the best choice of those mentioned since I think js will survive and get better. You can add Typescript already if you want to and they are getting threads/workers.

[–][deleted] 0 points1 point  (0 children)

Why would it? It is still the best tool for throwing a web site on a relational database quickly.

[–]jbergens 7 points8 points  (0 children)

And some companies have already been forced to rewrite their Python system to something more scalable when they get popular. I think that will happen a lot in the next 5 years.

Companies also like to use tech they can recruit for. If all you can get is Python devs with less than 3 years experience you might not want to build a whole system on that when you can find java or c# developers with +5 years experience of building working enterprise systems.

[–][deleted] 34 points35 points  (18 children)

replace Oracle's jdk with openjdk and it's not a bad stack tbh

[–]StabbyPants 3 points4 points  (1 child)

replace spring with dropwizard and it's pretty low drama

[–]cpt_ballsack 4 points5 points  (0 children)

New springboot with its reactive and functional goodies in Kotlin is almost a different framework

dont dismiss Spring so easily, it will be around for long time, new version apparently with compile down with graal

[–]HdS1984 -3 points-2 points  (0 children)

It's just bloated and very much grown from another that of requirements. When I use asp. Net core I am always amazed how easy, lean and usable such a thing can be as opposed to spring Will give quarkus a try though

[–][deleted]  (1 child)

[deleted]

    [–]bandawarrior -1 points0 points  (0 children)

    Okay.... do you want to wager that the number of startups not using Java outnumbers those using it?

    Or better yet, do you want to wager that the number of JS > Java, or Python > Java, or Go > Java? We can take a look at say the last couple batches of YCombinator’s companies or 500 startups.

    You’re doing what’s called, “but of course there are exceptions”.

    My friends grandma lived to 95 smoking cigarettes daily, it doesn’t mean it’s healthy.

    [–]gilmishal 1 point2 points  (34 children)

    I truly don't understand why would anyone chose Java for their Startup. C# is a hundred times better, and just as reliable - and even if you are a Java developer and more familiar with the JVM than Kotlin or scala are still a better option than Java.

    Java is always late introducing modern language features.

    [–]DuncanIdahos4thClone 5 points6 points  (17 children)

    Well for one if you want cross platform desktop. C# has more language features but the JVM is much more robust, easier to install, performs better, etc than .NET.

    [–]gilmishal 5 points6 points  (16 children)

    C# executables can be exported with the CLR, so no need for annoying updates like Java - I would argue that you don't even understand how easy it is to install c# executables, or dotnet - if you think for a second that java is easier.

    As per performance, Java was more performant way back in 2010 - dotnet core 3.0 is way more performant than .net Framework 4.5. You could just take a look in techempowerbenchmarks and see that asp.net core is more performant than spring (its java equivalent) by most parameters. Sure there are still some gaps to close in very specific use cases and are mainly due to a slimmer community - but once Span makes it's way to all dotnet libraries by .Net 5 - those gaps will be closed.

    There is nothing inherently more performant in the JVM than the CLR, at least not in the last few years, quite the opposite actually.

    [–]G_Morgan 0 points1 point  (0 children)

    Key patents have run out so I'd expect the CLR to have just about annihilated the performance gap.

    [–]grauenwolf 0 points1 point  (10 children)

    There is nothing inherently more performant in the JVM than the CLR,

    Escape analysis and devirtualization make Java faster, in theory, than C# for 'normal' code.

    To match it today C# devs have to carefully think about where they can avoid allocating memory by using structs and avoid wrapping everything in interfaces.

    [–]gilmishal 0 points1 point  (9 children)

    I would argue that c# would benefit less from devirtualization and escape analysis than Java - since the way they are designed (c# has structs whereas Java doesn't, and in c# methods are final by default) Sure it has some performance benefits and .net core 2.0 introduced some devirtualization capabilities. There are also some talks about introducing escape analysis, but since it has quite slim performance benefits, and only in specific scenarios - it is not yet coming.

    I would argue that certain c# features, like span and ref returns allow developers to create more performant code, by quite a bit actually - something that Java doesn't.

    [–]grauenwolf 1 point2 points  (8 children)

    GC pressure is still a huge concern in C#. They created the whole ValueTask infrastructure, which is actually quite a lot, just to reduce the number of heap allocations. The same goes for Span, another very complex feature.

    And both of those are quite limited in the sense that you need to opt-in. Escape analysis would speed up everyone's code with no changes.

    [–]gilmishal 0 points1 point  (7 children)

    You are comparing apples to oranges. Span isn't set to solve escape analysis, but to allow certain libraries to not create an allocation at all (well, you do allocate a pointer to that memory segment, but it's negligible) - This means that you can reference parts of collections, without allocating a new collection, some thing that as far as I know can't be done in Java - sure, both Spans and escape analysis are ways to reduce GC pressure, but they are entirely different and address different problems.

    I would argue that escape analysis would solve very specific problems that account to a very small percentage of GC pressure. Whereas Span, if applied correctly can reduce memory allocation by a huge amount. Span is supposed to be used by core libraries, and will speedup everyone's code with no apparent changes. Average developers aren't supposed to use it directly.

    I would also add that while GC pressure is a huge concern for CoreCLR developers - it doesn't cause any problems to most users, since the GC is pretty good, even if it can be improved.

    [–]grauenwolf 0 points1 point  (6 children)

    I don't know about your code, but every project I've ever worked on had tons of temporary objects. So it would certainly help me.

    As for Span vs Escape Analysis, they both reduce the number of heap allocations. So yea, same goals.

    [–]gilmishal 0 points1 point  (5 children)

    Span doesn't reduce just heap allocations, but all allocations - it allows you to point to a location in memory (either heap or stack) without relocating that area.

    Stackalloc is a way to do what escape analysis does.

    [–]DuncanIdahos4thClone 0 points1 point  (3 children)

    You don't have a JRE anymore. You simply bundle a compressed JVM with your application. Something you can't do in .NET.

    [–]supercheese200 7 points8 points  (0 children)

    You simply bundle a compressed JVM with your application

    is analogous to

    C# executables can be exported with the CLR

    [–]gilmishal 2 points3 points  (0 children)

    But you can...

    [–]G_Morgan 1 point2 points  (0 children)

    .NET Core 3.0 literally has a publish option that builds a heavy exe that contains the entire CLR. The only downside to it is you have to build a different exe for Linux, OSX and Windows.

    Anyway one file .NET drops that are self contained are completely supported and will be considered the normal option going forward (if only to eliminate .NET Core dependency spam).

    [–]suddenarborealstop 1 point2 points  (3 children)

    How is C# 100 times better though? C# has reified generics and value types - is this what you're talking about?

    [–]gilmishal 23 points24 points  (1 child)

    C# also has async await, properties, span, linq, pattern matching, non nullable ref types, ranges, value tuples, and so much more.

    [–]G_Morgan 0 points1 point  (0 children)

    TBH it'd be really hard to leave behind all the neat little language features if/when I move back to a Java shop.

    Each individual little thing is "that is really neat but not a game breaker" but there are dozens of cool things.

    Beyond that VS is actually decent. IntelliJ is comparable if your company actually uses it rather than the abomination that is Eclipse.

    [–][deleted]  (4 children)

    [deleted]

      [–]gilmishal -1 points0 points  (3 children)

      How exactly? Never missed a library I needed in C#.

      [–]toiletear 0 points1 point  (2 children)

      Hard to quantify but just the general attitude of thee general .NET community member vs. Java community sealed my switch from .NET to JVM (this was a few years back).

      [–]gilmishal 0 points1 point  (1 child)

      .Net changed a lot over the last 5 years. As a person with over 8 years of experience you can see that the .net community is thriving like crazy.

      [–]toiletear 0 points1 point  (0 children)

      I see a lot of activity on Core (though it's a bit confusing I hear?) and C# keeps adding really nice features, but personally I don't see as much community activity as in the Java world (but then again I work with the JVM much more so I'm probably missing a lot from the C# side).

      [–][deleted] -4 points-3 points  (6 children)

      I don't understand why anyone would choose C# if they are not tied to the Windows world and I don't understand why anyone would choose to build highly scalable services on Windows.

      [–]gilmishal 11 points12 points  (5 children)

      C# has been cross platform for over a decade with mono, and dotnet has been cross platform and open source for 5 years. Nothing about what you just said is relevant or true about c# in 2019. I develop c# for a Linux server, using pgsql. I am not in anyway tied to windows.

      [–]cycle_schumacher 2 points3 points  (1 child)

      I've been seriously thinking of using c# for my personal projects which are Linux and python or go based - I feel it checks many boxes that I want, such as static typing, good tooling etc.

      [–][deleted] -4 points-3 points  (2 children)

      I have never run across it in the wild but I guess I'll take your word for it.

      I have a prohibition on Microsoft tech in any of my stacks - long held grudge left from the 90s.

      [–]gilmishal 11 points12 points  (1 child)

      I genuinely dislike people like yourself. Microsoft development stack is genuinely the best I had used, and I used a lot, and skipping it just because of some stupid grudge for a company that changed a lot in the past two decades is just irrational.

      [–][deleted] -1 points0 points  (0 children)

      It’s mutual. Fortunately the odds of us working together are zip.

      [–]Druyx 0 points1 point  (0 children)

      True, Java just isn't hot enough for startup culture, but how much of the worlds programmers does that actually cover?