How to explain an analog state variable filter ..

Peter Korsten EMAIL HIDDEN
Fri Oct 14 16:45:23 CEST 2011


Op 14-10-2011 13:36, Martin Naef schreef:

> The problem of C and C++ is that you can shoot yourself in the foot. The
> strength of C and C++ is that con can shoot yourself in the foot if
> there's a good reason.

Yeah, trying doing BER decoding with unsigned integers and without 
mmap()... for this sort of thing, Java is useless, and it's something we 
actually need at work. So that I wrote in C.

> Look, what you're saying is totally true in the enterprise world. When
> it comes to the embedded world, things look quite differently. I haven't
> heard of any real-time Java implementations, at least none that are
> truly out in the field. Or to give another server / desktop example:
> High-performance math or signal processing libraries. Until you exploit
> vector instructions, you'll always lose massively. For those
> applications, you're back to C++.

True, but correct me if I'm wrong, but I'd say those are relatively 
straightforward applications. Data in, run some computations, data out. 
You probably don't have to worry if halfway through your TCP/IP 
connection suddenly goes AWOL, or try to prevent hack attacks.

What you're saying I mentioned, too: that you don't want to use Java for 
high-performance computational tasks, and I wouldn't want to rewrite 
something like Source or CryEngine in it either. But for an awful lot of 
applications, Java's performance is good enough, and its added 
advantages make it compelling to use.

Oh, and as for embedded systems, would you consider a blu-ray player 
embedded? :) Actually, Java runs on an awful lot of systems. Real-time 
it may not be, but embedded, I'd say it certainly is.

> Does any of that apply to you? Probably not. Does it apply to me (and
> lots of developers in my company)? Yes.
>
> There's a place for many different languages. There's absolutely no
> place for "language X sucks", unless you specify what exact problem
> you're trying to solve.

Ah, but I don't think that C++ sucks, per se. It sucks for the vast 
majority of things you might want to do, though. :) But said moron on 
thedailywtf.com thought that Java sucked 'because it's slow'.

The biggest problem of C++ is its incredibly confusing syntax. And 
because it's a multi-paradigm language, it can have many personalities, 
even at the same time. If that happens to a human, they put him on 
medication.

C, for all its faults, does not have that problem. Once you understand 
pointers, you know all you need to know about C. But C++, no, you'll 
need to understand pure virtual functions and multiple inheritance, not 
to mention that it was standardised only *after* Java was invented (and 
standardised) by Sun.

Objective-C appears to take a different approach, and although I'm not 
convinced by the few syntax examples that I've seen, the trend appears 
to be for C's popularity to be more or less stable, Java going down (but 
still the most popular, depending on who you believe), C++ going down, 
and Objective-C going up.

Anyway, my point is that C++ is a horrible language, even though it 
doesn't suck at everything. :)

- Peter



More information about the music-bar mailing list