Article View: borland.public.cppbuilder.oodesign
Article #89Re: BCB and OO
From: Alisdair Meredith
Date: Tue, 03 Aug 2004 05:45
Date: Tue, 03 Aug 2004 05:45
39 lines
2034 bytes
2034 bytes
fwang11 wrote:
> could embed it in another class, eg
>
> class TForm1: public TForm
> {
> private:
> TForm2 *Form2;
> }
What does this achieve?
In what way is this a 'better' design than the BCB default?
> To make it pure C++ instead of mix C and C++.
I'm not sure what 'pure' C++ is.
I can write a lot of C++ that looks nothing like 'C' and still uses no
classes. C++ is a 'multi-paradigm' lanaguage, and OO is only one of
them.
Many leading C++ advocates (including some on the ISO comittee) now
believe 'free functions' (i.e. non-member functions) give better
encapsulation than member functions (i.e. better OO) and are more
re-usable in generic code. Would you also dismiss this as writing 'C'
rather than 'C++'.
For the record though, the only global form variable I use is that of
the main form. I routinely remove all the others from my source. Just
because BCB automatically generates them for me does not mean I need to
use them!
However, 'quick and dirty' projects (often prototypes) may be developed
that little bit quicker by cutting such corners, and that is one of the
key markets for BCB, and RAD in general.
AlisdairM(TeamB)
Technical Details
Message-ID:
<410f2665$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<410eeeef$1@newsgroups.borland.com> <j5acxdgdzy.fsf@explicit.atdesk.com> <410f0267@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10db1e,2b952f7b4dbe888b X-Google-Attributes: gid10db1e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Alisdair Meredith" <alisdair.meredith@no-spam-splease@uk.renaultf1.com> Subject: Re: BCB and OO Newsgroups: borland.public.cppbuilder.oodesign References: <410eeeef$1@newsgroups.borland.com> <j5acxdgdzy.fsf@explicit.atdesk.com> <410f0267@newsgroups.borland.com> User-Agent: XanaNews/1.16.3.1 NNTP-Posting-Host: 81.155.64.85 Message-ID: <410f2665$1@newsgroups.borland.com> Date: 2 Aug 2004 22:45:09 -0700 X-Trace: newsgroups.borland.com 1091511909 81.155.64.85 (2 Aug 2004 22:45:09 -0700) Lines: 39 X-Authenticated-User: ameredith Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail