Mail Archives: geda-user/2015/02/14/20:22:13
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 -