delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2015/02/14/20:22:13

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
X-Cam-AntiVirus: no malware found
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Message-ID: <1423963261.16089.5.camel@cam.ac.uk>
Subject: Scheme back-ends [ WAS: Re: [geda-user] on the choice of languages]
From: Peter Clifton <pcjc2 AT cam DOT ac DOT uk>
To: geda-user AT delorie DOT com
Date: Sun, 15 Feb 2015 01:21:01 +0000
In-Reply-To: <2C0E4141-5E16-4129-8370-35215BB48153@noqsi.com>
References: <mblhhr$uvp$1 AT ger DOT gmane DOT org>
<CAOuGh89uhX3p+=AbcgZ20gen0hP4rg9FngAaMo3d4HVQ3bF0ow AT mail DOT gmail DOT com>
<mbltsv$ae2$1 AT ger DOT gmane DOT org> <alpine DOT DEB DOT 2 DOT 00 DOT 1502140527190 DOT 7324 AT igor2priv>
<1423934635 DOT 760 DOT 7 DOT camel AT cam DOT ac DOT uk>
<749069FC-424B-4516-A37A-735CF9052EB9 AT noqsi DOT com>
<201502141928 DOT t1EJSWoi022831 AT envy DOT delorie DOT com>
<2C0E4141-5E16-4129-8370-35215BB48153 AT noqsi DOT com>
X-Mailer: Evolution 3.12.7-0ubuntu1
Mime-Version: 1.0
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, 2015-02-14 at 10:02 -1000, John Doty wrote:
> On Feb 14, 2015, at 9:28 AM, DJ Delorie <dj AT delorie DOT com> wrote:

> Huh? It was *Peter* who was criticizing the Scheme back ends. My
> comment was a little bit of a joke, since I wrote some of them. My
> earliest contributions *are* badly written, “cargo culted” from bad
> examples. But I generally approve of the back ends, as the whole
> paragraph that sentence came from showed. I *encourage* contributions
> of back ends, and I don’t mind that the code isn’t wonderful. It
> doesn’t need to be: it just has to get the work done.


I'm sorry if I caused anyone offence by characterising all the current
netlist backends as badly written. That was unfair, especially as I'm
not particularly fluent in scheme myself, and the comment was based on
my inability to follow the code in many of them.

Let me re-state my assessment more neutrally:

1. I find it hard to read and/or understand the existing back-end code
2. I find it hard to construct good back-end code, as a) my scheme
skills are limited, b) it is hard to learn by example due to 1.
3. Clearly others share some of these opinions.


Getting the job done is great and so is the core idea of a plug-in
system. It is clear though, (as I believe you have already identified),
that gnetlist and its scheme API also need extending or revising in
order to expose everything required for some use-cases.

The libgeda scheme binding has been worked on a lot since I was actively
following gEDA/gaf development though, so things in that regard may be
better than I remember.


Scheme is probably not (now) the best choice of language for the purpose
we employ it, especially as writing good, readable scheme code is hard.
(And understanding existing scheme code can be even harder!)

Something like python or Lua where it is easier to write readable code
might be better, but remember that gEDA/gaf was started a long time ago.
(And these languages might not have been a good choice at that point).

Scheme is here to stay, and whilst additional language bindings might be
added in the future, we will likely always need to maintain backwards
compatibility with existing netlist back-ends and designs.

Regards,

-- 
Peter Clifton <peter DOT clifton AT clifton-electronics DOT co DOT uk>

Clifton Electronics

- Raw text -


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