Why I think Java will take the lead over C++

Discussion in 'App Development' started by wavetrader007, Dec 6, 2011.

  1. btw the resources for C# alone are a multiple times larger than for Java, whether open source, or proprietary. Can you show us a few JAVA proprietary charting libraries that come even remotely close to what you can do with WPF (universality such as DevExpress vs Specialized high performance such as SciChart)? I am curious. How about support websites? Check out the number questions asked about Java vs C# at the world's largest coding website, StackOverflow.

    By the way up-to-date performance tests in well written C# code pretty much blow away Java in each and every category. Good luck though with your weird and totally opinionated, from reality removed, statements.



     
    Last edited: Apr 8, 2015
    #31     Apr 8, 2015
  2. and for good reason, the constant compiler optimizations and improvements in the .Net stack make it the one of the fastest OOP languages, running circles around some Java code. Have you tried to write fully async/multi threaded code in .Net, nothing is simpler and yet so performant.

     
    #32     Apr 8, 2015
  3. wow, wow and wow. That I would ever hear C# praises from your mouth, I am flabbergasted
    ;-)

     
    #33     Apr 8, 2015
  4. 100% agree. We had similar threads many times on this site, and each and every time it turned out that the open source, free here, free there, were the ones who claimed C#/.Net was the worst ever invented and most often the reason given was that MS dared to charge money for its IDE. Lol, so there you go, sometimes reasons for like and dislike can be rooted in very obscure beginnings.

     
    #34     Apr 8, 2015
  5. maxpi

    maxpi

    Isn't IB's stuff written in Java and perennially messed up? Could be cause and effect there...
     
    #35     Apr 8, 2015
  6. #36     Apr 15, 2015
  7. xandman

    xandman

    What do you guys think of the Smart Quant Framework?
     
    #37     Apr 16, 2015
  8. hft_boy

    hft_boy

    Without getting into the language flamewar (again), I want to point out that, while usually the maxim 'you get what you pay for' holds true, open source ('free') software has actually been an extremely successful model for distributing and maintaining software, and it is not the realm of 'skateboard hippie programmers'.

    It is kind of counter intuitive. But my hypothesis is that being able to build off of others' infrastructure in the software world is so powerful that communities that follow the open source model do in fact Get Stuff Done. Let me stress that I'm not bashing proprietary software and a lot of times the proprietary model makes sense. But open source software also works well, and large successful corporations like Intel, Twitter, Facebook, Apple, Google all use plenty of open source software and contribute substantially to the open source community. In fact Linux is mostly maintained by corporate employees (cf. http://www.extremetech.com/computin...-develops-linux-the-answer-might-surprise-you). Many, many technologies started life as closed source projects and were released as open source when the owners decided the cost of maintenance and development would be lower as an open source project. Examples include OpenJDK (the standard Java platform), Darwin (which OS X and iOS are based on) and many others.

    -----------------------------------------------------------------------------------

    Also the standard tagline "GC is for dummies, it invariably results in stop the world crap and you lose predictability" -- largely is true, but you can never escape non determinism. Like once you get rid of stop the world GC (usually by reimplementing in C++), you need to start worrying about when a call to free() is going to trigger a walk of the free list. Or when the scheduler is going to kick you off the next slice. Or when the CPU triggers some random interrupt. Or what the latency of serializing a packet header will be when a router you don't even own is clogged. All of these things contribute to non-determinism at different points in the system, and GC is just one of the more obvious. As a system designer you need to figure out what the constraints your system must adhere to and code to that. If you are worried about millisecond or even microsecond level jitter then if you are a sufficiently talented programmer you can pull it off. If you are worried about nanosecond jitter then you either have deep pockets or are facing an impossible project.

    Frankly, these days I am worried less about any particular performance constraint and more about correctness, being able to quickly write correct code is the way to get to the top. Fast code is useless if it fails, just look at Knight. Plus it takes so much longer to write. If you need more performance, it's easier to either buy a faster computer/cluster/supercomputer or literally to just write a fucking compiler (aka code generator) to output the code that meets your performance specifications than to hand optimize and verify each line. So in my current worldview the best language is the one that has better codegen / correctness proving / productivity facilities than a better runtime. (Java and C++ both fail quite miserably in this regard, unfortunately).
     
    #38     Apr 19, 2015
    volpunter likes this.
  9. I was not the one who used the term 'skateboard hippie programmers'. And my criticism towards the arguments used by those who take issue with Microsoft was not targeting the use of open source software but their hatred towards anything made by Microsoft. My point was that it is tiring to constantly hear people moan about the fact that proprietary software costs money. Just because some chose the route to go open source does not mean everyone has to hand out freebies (I am aware most open source licenses are anything but freebies).

    I disagree with your GC comment though: I run a platform which core is entirely based on C# (some hooks into APIs are coded in C++) and my platform has been running very stable for years now. I am not dependent on microsecond executions and latencies and even a platform entirely written in C++ does not escape non determinism simply because an event based architecture is non deterministic by definition, not to even mention incalculable CPU triggers or cache misses, unforeseen latency in the network stack or the like. Not a million unit tests will cover every combination of events that can occur at once. My point here is that every language and every implementation presents uncountable potential points of failure. Handling potential errors, even when the exact error cannot be predicted, is what sets an excellent developer apart from the pack. Whole books can be written about error handling. But suggesting GC on average results in "stop the world crap" is a quite bit undeserved imho, to put it mildly. If I had to put a wager on either a failure of GC or a bug due to the improper handling of memory by a C++ coder then surely my money will be on the C++ coder failing. You may not agree with the last line but I sense that we broadly agree on not ranking languages but rather the quality of implementations.

    Regarding your last line I full heartedly agree. In the department of writing correct code fast I think C# is pretty high up on the list (but then again we are talking about language rankings).




     
    #39     Apr 20, 2015
    hft_boy likes this.
  10. hft_boy

    hft_boy

    Yes, I agree. I think we are actually saying similar things, that GC is just one of a million possible 'bugs' -- in certain contexts a stop the world collection is a bug and in others it is not, but the point is there isn't any language or platform which will save you from yourself ;).

    Also I haven't written any C# myself but it looks quite nice. If you are interested, check out D as well, it offers low level memory management, some nice template facilities as well as many features from more modern languages like C#. The drawback is it is not popular (yet?) so the libraries and tools tend to be lower quality. Not sure if it will be your taste but worth taking a look.
     
    #40     Apr 20, 2015
    volpunter likes this.