← Back to team overview

kicad-developers team mailing list archive

Re: Was: page selection dialog, everybody please comment

 

On Fri, Apr 19, 2013 at 02:11:08PM +0200, jp charras wrote:
> Good or bad practice mainly depend on your criteria:
> I know (and Dick knows) using an user visible string can create
> issues, but using an index is not better:
> when you insert a new item or change items order, indexes in
> existing files will be broken.

Agreed. In fact I was advocating for indexes as the code level; the
external representation is another thing. The same hold for layer
numbers, they are mapped to name in the file which is good.

> Indexes are always an image of the internal code, and I can say
> using them is also a bad practice.
> However they are often used because this is an easy way to store info.

A string as an index is useful *if* is constant. And shouldn't visible
to the user (surrogate key theory docet). If the paper collection would
be wildly variable and customizable I'd agree to index it by string. But
the internal name or the user name? Using the user name for stuff bit me
a lot on windows drivers :P

In fact when enlarging the palette I used color names (the internal
ones) for the config file; the dialog palette would then translate them.

> Good or bad practice just depends only the most important issue you
> want to fix or avoid (like file readability), and the time you
> accept to spend to code some things.

Completely agree.

> Layers names, number of layers and other things related to layers
> (setup dialogs, DRC requirement...) are an other topic,
> and I can say a *very* complicated topic that cannot be fixed in one minute.
> This topic *needs* time and *very good* ideas.
> (And not just a remark like "I want more layers", useless for developers)

This is the reason for the previous (long) messages and for not
committing other thing I've been trying for trying. I concur that the
layer issue is not trivial but saying "layer are called this way because
I like it and it's so" is a very bad argument for me. Especially when
other people ask for change *and* some of these changes are already in
the code.

-- 
Lorenzo Marcantonio
Logos Srl


References