🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #21547

Re: How REALLY portable is C++?

#21547
From: Tim Ottinger
Date: Mon, 15 Sep 1997 00:00
58 lines
3068 bytes
> Subset rules:
>
> 1.  No multiple inheritance except for pure-virtual
> pure-abstract mix-in base classes (i.e. just like Java
> "Interfaces").

Where is this not supported, or supported with language extensions? To
my knowledge, this is supported everywhere.I've not met a compiler that
won't allow it. And it's also not likely to be removed in the future.
It's just too useful.

> 2.  No templates.  Period.  Sorry!

I understand this, but I've seen templates supported one way or another
everywhere. Take a lesson from Doug Schmidt's stuff a
www.cs.wustl.edu/~schmidt. He uses templates and has had to work around
more compilers than you'd care to.

> 3.  We're using exceptions.  Hopefully this won't blow up on
> us!!  Of course, there will be no exceptions from destructors.
> This is problematic...

Actually, I've found more discrepency in exceptions than in the things
you've avoided!

> 4.  We also have a large set of restrictions merely for
> readability/consistency/safety (no operator overloading
> especially conversion operators, no constructors with
> functionality, no static casts, no dynamic casts if we can help
> it, no friends, no global anythings, etc. etc.

I also understand the problem with the new style casts (static_cast<>,
dynamic_cast<>, etc) and portability. I would think this isn't bad
advice with regards to portability.As a general rule unrelated to
portability, I agree on conversion operators.

A lot of this seems unnecessarily restrictive and unrelated to
portability.

You didn't mention the obvious porting concerns of character sets
(wchar) or of integer sizing, or whether you should use long longs and
thelike. It would have been nice to see those addressed.

This discussion would not be complete without mentioning the use of 3rd
party libraries and platform-specific libraries. You're probably best
off to take a look at the C++ Available Libraries FAQ and see what's
available. You should look at the work by RogueWave, ObjectSpace, and
others for supporte platforms. If 3rd party stuff fits your needs, then
you should buy v. build. You should also look into the ACE Wrappers
library which wraps up a lot of platform-specific calls in a portable
way.

Tim



Technical Details
Message-ID: <341D76A5.3BD55538@dave-world.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.object.mbox.zip!not-for-mail
References: <199708290453.XAA15800@manifold.algebra.com> <5ue70q$9me$1@news0.xs4all.nl>

Show Full Headers
Complete Article Headers
Message-ID: <341D76A5.3BD55538@dave-world.net>
Subject: Re: How REALLY portable is C++?
Date: Mon, 15 Sep 1997 00:00:00 +0000
From: Tim Ottinger <tottinge@dave-world.net>
References: <199708290453.XAA15800@manifold.algebra.com> <5ue70q$9me$1@news0.xs4all.nl>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.object.mbox.zip!not-for-mail
X-Deja-AN: 272777301
X-Priority: 3 (Normal)
Newsgroups: comp.lang.c++,comp.lang.c,comp.object,news.software.nntp,alt.2600,comp.os.linux.development,alt.genius.bill-palmer