me: *coding in c#*
"(asd() ? dsa(1) : dsa(0) );"
c#: lol nah bro
me: ....

me: *opens a java ide*

  • 7
    like seriously why the fuck doesnt it have inline if???

    and yes i fucking know it works with returns shut up
  • 4
    @BindView null coalesce > anything in Java
  • 2
    @px06 coalescing still doesnt substitute if(), its an assignment operand so
  • 18
    @BindView so is the tertiary operator.

    You should put it inside the method call:

    dsa(asd() ? 1 : 0);
  • 2
    @gblues nice, nice
  • 4
    @gblues exactly.

    If is for statements and tertiary for inline expression, cannot see a problem.
  • 1
    Having worked commercially using java, albeit with the hideousness that is jsp's, and C# I agree that (at least as far as i am concerned) C# shits all over java. But, each to there own. Just start playing with Linq and you'll soon start to tap into the elegant beauty that is C#. :-)
  • 2
    Java is the sad sad language for people that don’t know the elegance of linq and C#...
  • 0
    every time i rant about c#, people swarm with "c# is elegant". Unneccessary built in abstractions are not elegant, they are distracting
  • 1
    Linq isnt an abstraction, nor is it built in. In fact is not-built-in so much so that the C# extension methods feature was developed to facilitate implementation of Linq to ensure it didn't break existing collections api. But as I said earlier: too each their own :-).
  • 0
    @BindView this is an expression. There is absolutely no reason to use it as a statement. Simply use an "if" statement.
  • 0
    @BindView can you give an example for such an abstraction?
  • 0
    @elazar when you fetch the whole json from the api in one command but i wanted to fucking skip every second line for example. I mean yeah cool, js developers need some language to understand but unneccessary abstractions are not the way in enterprise languages
  • 0
    @BindView how is that a language issue? It's a library whose API is not to your liking
  • 1
    @BindView only if you get payed by loc.

    C# is a very robust language and all new features is optional if you do not like them.

    Java has more cross platform support and probably more ready made integrations.

    You should never try to trash a language out of ignorance. You only open your self to bite backs ;)

    I have worked with basic, cobol, pasca, c, javascript and a few more so I feel I can claim C# is a good language

    Better or worse than java I cannot say as my experience with Java is both to little and to out of date but I have heard that the latest version have made some good improvements.
  • 1
    @Voxera let me complement:
    Latest Java versions have improvements, but nothing that C# does not have, and some (streams) are syntactically awkward to use.

    The only thing that Java (the language) has over C# is simplicity of the language. Portability a JVM feature, not language feature.

    Sadly I have used Java much more than C#.
Add Comment