Arioch wrote:
tcoq wrote
 a laziness to software design: what you can't name you actually don't
design...

Guess you meant "don't want to" instead of "can't"
And You mean all the non-named arrays, don't you.

"var x: array[0..10] of integer; " is not only violating Pascal Report, but
also is twice lazy.
since one should name every part of design one should type like

type SomeEnumSemanticName = 0..10;
    SomeEnumMapSemanticName = array[SomeEnumSemanticName] of integer;
var x: SomeEnumMapSemanticName;

Except that not defining a distinct type emphasises that the array is only being declared once, and is not being passed around as a parameter. So I'd suggest that there are cases where the first example is appropriate, except obviously that that ..10 is rarely if ever acceptable.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to