comp.lang.ada
 help / color / mirror / Atom feed
From: beckwb@ois.com (R. William Beckwith)
Subject: Re: Naive question about system dependencies
Date: Fri, 23 Sep 1994 04:34:54 GMT
Date: 1994-09-23T04:34:54+00:00	[thread overview]
Message-ID: <CwKFE6.3n7@ois.com> (raw)
In-Reply-To: 35s3hi$67p@gnat.cs.nyu.edu

Robert Dewar (dewar@cs.nyu.edu) wrote:
: The whole idea in using separate bodies should be to completely avoid
: code duplication. Only the code that is system dependent, and hence
: NOT duplicated, i.e. the code that would go inside the range of an 
: ifdef, should be in separate bodies, code outside the ifdef can be
: shared.

snip

I couldn't agree more.

When we first starting designing Screen Machine (portable GUI/CUI
product) many years ago, I missed the occassional #ifdef.  Instead
of using cpp we decided to architect the code in such a way that
we could plug in the appropriate platform/compiler specific code.

It has worked out very nicely.  Instead of the incredibly long,
complex preprocessed source files you end up creating over the
years, we ended up with an architecture that allows us to make
structural changes to our code without the typically worries of
breaking an ifdef (rats) nest.

We now maintain 153 binary products with _one_ (real busy)
porting engineer.  The current source directory heirarchy for
the library component of Screen Machine speaks for itself:

    sm
    sm/char
    sm/char/dos
    sm/char/dos/a16
    sm/char/dos/a32
    sm/char/dos/m16
    sm/char/dos/m32
    sm/char/unix
    sm/char/vax
    sm/gui
    sm/gui/Xm/unix
    sm/gui/Xm/vms
    sm/gui/Xm/r1000
    sm/gui/Xm/net
    sm/gui/win16
    sm/gui/win32
    compiler
    compiler/Alsys16
    compiler/Alsys32
    compiler/Apex
    compiler/DECAda
    compiler/IBMAda
    compiler/Merid16
    compiler/Merid32
    compiler/OCSLegacyAda
    compiler/Rational
    compiler/SunAda
    compiler/Teles16
    compiler/Teles32
    compiler/Verdix
    compiler/VMSAda
    platform
    platform/dgux_88k
    platform/aux_68k
    platform/hpux_pa
    platform/isc_intel
    platform/lynx_intel
    platform/dos_intel
    platform/osf1_alpha
    platform/delta_r1000
    platform/aix_power
    platform/sco_intel
    platform/irix_mips
    platform/solaris2_intel_
    platform/solaris2_sparc
    platform/solaris1_sparc
    platform/ultrix_mips
    platform/ultrix_vax
    platform/win31_intel
    platform/winnt_alpha_
    platform/winnt_intel
    platform/winnt_mips_
    platform/vms_alpha
    platform/vms_vax

... Bill

-- 
e-mail: Bill.Beckwith@ois.com       |    Team Ada
Objective Interface Systems, Inc.   | dist, full O-O
1895 Preston White Drive, Suite 250 | multithreading
Reston, VA  22091-5448  U.S.A.      |    built in



  reply	other threads:[~1994-09-23  4:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-09-15  6:32 Naive question about system dependencies Howard Holm
1994-09-16 17:28 ` Tucker Taft
1994-09-17 16:23   ` Mats Weber
1994-09-19 12:05     ` Ted Dennison
1994-09-19 14:39       ` Cyrille Comar
1994-09-19 15:00       ` Norman H. Cohen
1994-09-20  9:02       ` Stephen J Bevan
     [not found]     ` <85B716C4188@annwfn.com>
1994-09-22 13:33       ` David Kehs
1994-09-22 14:15       ` Robert Dewar
1994-09-23  4:34         ` R. William Beckwith [this message]
1994-09-22 14:54       ` Norman H. Cohen
  -- strict thread matches above, loose matches on Subject: below --
1994-09-19 14:48 Bob Crispen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox