J
Joshua Cranmer
Really??
You trimmed the part where he elaborated on what that phrase meant.
Really??
I was trying to make sense of where you were coming from with your
predictions, and then I realized—you’re primarily talking about corporate
development. Because that’s just about the only place languages like Java
and C#/Dotnet get much use.
Very few mass-market or open-source apps are
written in those languages, for example.
The Java designers wanted everything that C++ templates offered.
The Java designers wanted everything that C++ templates offered. The only
parts they omitted were the ones they couldn’t have.
Not at all. The reason is exactly as already stated, namely that people
seem to assume that the linker has no intelligence, or that there is a
linker in first place. Nevertheless, the C++ standard doesn't even
define linking, and the world is no longer that simple. Thus, I still
don't see how this argument applies. Surely the C++ world works
different from the java world, but saying that there is no duplicate
code in Java or that there is always code duplication in C++ is surely
wrong.
That's much more than a macro could do. Templates are a language of its
own, include syntax checks, etc. Quite unlike macros, they do not
substitute text patterns. Templates allow meta-programming, i.e. you can
use the compiler to generate code. And, of course, templates are quite
complex - very unlike the simple-minded preprocessor.
That’s right, I forgot there is no “standard spec†for Java, it is simply
what Sunacle says it is.
Not too much that you can’t write portable code in it.
Not really. Sticking to standard POSIX types like size_t, time_t etc gets
you a lot of the way there.
Absolutely correct. It is very easy to write potentially broken C++
programs that run perfectly fine on a certain architecture compiled with
a certain C++ compiler using a certain set of compiler options.
Bad programs may depend on different types of invalid assumptions. To
name a few: assume sizeof(T)==sizeof(U), assume char is signed/unsigned,
assume bitfields are signed/unsigned, make assumptions about struct
alignment.
For certain APIs (MS Windows conatins lots of them) struct layout
assumpations are essential. Since there was no standard way of
expressing such assumtions code could easily break just by changing some
compiler options. For that reason, each C++ distro came with its own
Windows header files.
Perhaps things have improved since I moved away from C++ in '99.
But the Java rule is the limitation now.
The Java designers wanted everything that C++ templates offered. The only
parts they omitted were the ones they couldn’t have.
It is 8086 architecture not 80286 architecture.
Windows has nothing to do with CPU architecture.
For certain APIs (MS Windows conatins lots of them) struct layout
assumpations are essential.
Without ifdef's ????
anywhere not everywhere
What do you think the S in JLS stands for?
Real C apps that will run predictable on any platform is
pretty rare.
POSIX does not cover all aspects.
And not all platforms are POSIX compliant.
Relevance being?
Is Java for anyone, or everyone?
You trimmed the part where he elaborated on what that phrase meant.
DOS/Windows is the only reason 8086/80286 segmented architectures became
popular.
DOS/Windows is the only reason 8086/80286 segmented architectures became
popular.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.