delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to geda-user-bounces using -f |
X-Recipient: | geda-user AT delorie DOT com |
X-Original-DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; |
d=gmail.com; s=20120113; | |
h=mime-version:in-reply-to:references:date:message-id:subject:from:to; | |
bh=RdObdzTlsdMLhHmqltiX9jUYbh33qUvZCx5zNAI6B7c=; | |
b=IADZf7b75DDlslRvZCEjqiPQu5ZIdMapycZlofybYcVoI+0wUuVMdc18tuhNdiON2O | |
Br5G1PkwZwZd5CC9nqUq80CGEuC223xtiPAZAutxGyRs/OIKeDoG2IsXfx0Gq6nOFW+g | |
CplVa72+85kEqy8JmPCoc0qwiw2kLU4bzN0+ZigrlBMX+C/DDrpOfy9NzP6xY87kPKFw | |
IgzoNYDLbJPoFKMx8g/q7Sihlu4v8P8WpZ2z1Lyoqc4Z76NiQLOegG2cqVyU1cOl+zSA | |
9bRqXIEugZCvYCrNw+uCP9PF5GRyyZQzUIROfizAz+AcmhH03IVRSTmJjjOqSEUOR4G2 | |
voPQ== | |
X-Google-DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; |
d=1e100.net; s=20130820; | |
h=x-gm-message-state:mime-version:in-reply-to:references:date | |
:message-id:subject:from:to; | |
bh=RdObdzTlsdMLhHmqltiX9jUYbh33qUvZCx5zNAI6B7c=; | |
b=j1/ZBjlQnMBInu24nkzkR+BXkuhvLET0LzLR/1cHG7alwTY+ZzlJmdmxHaFILetOfF | |
c9txX8QAnd3n39mN2ecdx7z/nwc43Ehj+MTI1cKeMehDmMiN8N8AwhRqg+SHckfPILUl | |
26POzLznV8kaZrRb3HwRuXR1dSN4p1x4t+Llsk/ymwEnw+t2gsTLOX0/rD7SIAlg+xAD | |
+otH1t+j6ocHlfzBmhcKviytBqRqDMMumZ2o433VJnEHwiKgMb0DYTFrq+NO4/bfpL1Q | |
UtbLfXdu8qKlApIw1rgef3FwGIEOvWfigyhPc+kL7oYnC5v7ENLT3nq0aLzILZw5TxWc | |
qPqg== | |
X-Gm-Message-State: | AOPr4FUKQc55WozB2J5CMME0QP3AUljEnjUmQzoG9+DLKlTDM8ZDkVC0O0WG3KB97HvNyl+GKLLYCzL0JscsgQ== |
MIME-Version: | 1.0 |
X-Received: | by 10.28.188.7 with SMTP id m7mr9611850wmf.37.1463258800552; Sat, |
14 May 2016 13:46:40 -0700 (PDT) | |
In-Reply-To: | <201605141432.u4EEWZ9s018507@envy.delorie.com> |
References: | <154a7fb8d8c-2a04-17506 AT webprd-a31 DOT mail DOT aol DOT com> |
<20160513081037 DOT GA23474 AT visitor2 DOT iram DOT es> | |
<5735ACC6 DOT 30105 AT iee DOT org> | |
<alpine DOT DEB DOT 2 DOT 00 DOT 1605140519090 DOT 28818 AT igor2priv> | |
<20160514094703 DOT fc95ba64dab2c53b068f260c AT gmail DOT com> | |
<201605141432 DOT u4EEWZ9s018507 AT envy DOT delorie DOT com> | |
Date: | Sat, 14 May 2016 12:46:40 -0800 |
Message-ID: | <CAC4O8c_kRySdpi9O9WxZyRRkre=ic_kr5FA7eEnuy2d-hHqEXA@mail.gmail.com> |
Subject: | Re: [geda-user] Re: gschem annoyances (C++) |
From: | "Britton Kerin (britton DOT kerin AT gmail DOT com) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com> |
To: | geda-user AT delorie DOT com |
Reply-To: | geda-user AT delorie DOT com |
Errors-To: | nobody AT delorie DOT com |
X-Mailing-List: | geda-user AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
On Sat, May 14, 2016 at 6:32 AM, DJ Delorie <dj AT delorie DOT com> wrote: > >> Main advantage of object oriented programming is function >> overloading and private variables in structures but excess amount of >> features stuffed in C++ is really a problem. I think C++ does not >> handle polymorphism well. > > The whole point of C++ is to handle polymorphism well, and it does. > For programs like gschem and pcb, which have lots of object types that > are "similar but different", an object oriented language like C++ > should be an obvious choice. > > Unfortunately, C++ is a huge toolbox and people think you have to use > every tool for every application, which leads to messy code. Please > don't assume that's the case, or that C++ code is going to be harder > to understand than C. > >> C/C++ lack good type checking which is a real disadvantage. > > Well, C maybe, C++ has great support for type checking. You just have > to write type-specific code. gobject has fine type checking mechanism pcb just doesn't use it. It wouldn't be worth it at all because as lisp/duck type proponents point out type errors aren't actually a problem in practice at least for programs pcb size. Admittedly gobject types are a pain to use but it's really not much worse than C++ where you need two parallel object structures one with pointers and then the same thing over again with refs. Britton
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |