C++: 4 paradigms?

A

Alf P. Steinbach

* jeffc:
How can you agree if you've neither bought it nor read it? The guy provides
you with chapter and verse for you to look up, you fail to do so, yet keep
arguing with him.

It so happens that your assumptions _and_ allegations are incorrect.
 
J

jeffc

Alf P. Steinbach said:
That is correct.

Your assumptions and earlier allegations are not.

In that case, it would be best if you went and played with yourself back in
your cave somewhere.
 
P

poiuz24

Yes C++ is a multiparadigm language and currently supports 4 paradigms.
I didn't know that.

But certainly it's not something everyone agrees on.

For example, I absolutely do not agree that C++ "supports" modular
programming, since there _is_ no module concept in C++. However,

sure: namespaces

put the public interface of your "module" into one namespace,
and the implementation into a second which drags in the interface
from the first. you'll end up with strict encapsulation of
functions, types, .. in one scope
C++ allows you to fake some of it by strictly following some set of

no need to fake .. namespace/using is all you need
i guess the keywords are a bit distracting .. take those
synonyms:

module := namespace
import := using
conventions (header file guards etc.). That's in the same spirit
as assembler language supports object-orientation (even old TASM).

headers are indeed a pain in the ass. "all" that would be needed
to get rid of them would be the compiler to spill out full static
type information into an object file for the linker to consume.

in .NET/CLI, thats "manifests"
in COM thats type libraries (TLBs)
in Java its in the class files itself

the important point to note of course: headers are not required
or defined by the C++ language standard, just happen to be
a widely deployed implementation artifact.

IMHO the two biggest failures of C++ standardization:

1. lack of ABI standardization
2. lack of full static type, standardized (per platform)
information in object files

1. would have prevented MS from inventing COM (a workaround for 1.)
2. would considerable lower complexity in build process
 
W

White Wolf

poiuz24 said:
IMHO the two biggest failures of C++ standardization:

1. lack of ABI standardization
2. lack of full static type, standardized (per platform)
information in object files

1. would have prevented MS from inventing COM (a workaround for 1.)
2. would considerable lower complexity in build process

Forgive me to say that, but your above words clearly show an absolute lack
of perspective on the topic. C++ is not a Windows only programming
language. The ABI standardization you are looking for is not even there for
the C language, on the Windows platform. That did not stop it from being
used there.

The C++ standard defines a programming language. Not a compiler, not a
linker, but a language. A language as the characters which make it up, and
their meaning. Having an ABI etc. falls into the hands of the platform
provider. If there is enough demand, they will make it work. Some may call
this a quality of implementation issue.
 

Ask a Question

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.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top