www.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2015/09/01/05:58:25

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Message-ID: <20150901095807.17257.qmail@stuge.se>
Date: Tue, 1 Sep 2015 11:58:07 +0200
From: "Peter Stuge (peter AT stuge DOT se) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
To: geda-user AT delorie DOT com
Subject: Re: [geda-user] SQL PCB file format
Mail-Followup-To: geda-user AT delorie DOT com
References: <20150826000523 DOT 353 DOT qmail AT stuge DOT se> <CAM2RGhQi83=d+H6be6z6v7HkchdXqkfkiypKsQf0mM+QGdiH9A AT mail DOT gmail DOT com> <55DDD4DB DOT 2060008 AT ecosensory DOT com> <20150826153031 DOT 4620 DOT qmail AT stuge DOT se> <201508261807 DOT t7QI7sS3003191 AT envy DOT delorie DOT com> <20150826182552 DOT 22702 DOT qmail AT stuge DOT se> <CAGYR9vci4fCsw05ryrV=NDNbyb6Ng1E3hyD3rF4TeBcdAaqhbg AT mail DOT gmail DOT com> <20150831140133 DOT 2dc0456c28430ebcfb0b17b5 AT gmail DOT com> <55E4471F DOT 3010906 AT jump-ing DOT de> <ms2s9b$rs6$2 AT ger DOT gmane DOT org>
MIME-Version: 1.0
In-Reply-To: <ms2s9b$rs6$2@ger.gmane.org>
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

Kai-Martin Knaak wrote:
> >> read through source code and find all functions or similar
> >> accessing the PCB file and put them in libpcb library file which
> >> would be become a storage library.
> > 
> > Pretty much all code accesses the stored data directly, no such
> > thing like accessors or setters/getters.
> 
> Something whispers "refactor!" in my ear...

Setters/getters are perhaps the worst side effect there is in source
code. Never introduce artificial overhead without very careful
consideration.

Data structures in memory are intended to be accessed directly and
ideally never copied.

Permanent storage is another matter. Setters/getters for files are
all the more appropriate - and that's exactly what libpcb and edacore
both would offer. I'm all for moving pcb file code into a libpcb.


//Peter

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019