Re: Suffix _T for types found good



On Aug 7, 6:04 pm, Ray Blaak <rAYbl...@xxxxxxxxxxxxxxxxxx> wrote:
Colin Paul Gloster <Colin_Paul_Glos...@xxxxxxx> writes:

 index : anIndex;
 buffer : aBuffer;

This is backwards to me:

  anIndex : Index;
  aBuffer : Buffer;

E.g. the value is a specific instance vs the type is general. The names should
reflect that.

--
Cheers,                                        The Rhythm is around me,
                                               The Rhythm has control.
Ray Blaak                                      The Rhythm is inside me,
rAYbl...@xxxxxxxxxxxxxxxxxx                    The Rhythm has my soul.

Ah, but "a" (or "an_") are 'indefinite articles' in English (which
this is obviously trying to replicate), i.e. they don't specify any
particular instance. A variable does specify a particulary instance,
so using "a_"/"an_" for them is wrong. "better names" are what are
always called for :-)

The_Buffer : A_Buffer;
The_Index : An_Index;

or

My_Buffer : A_Buffer;

or

User_Input_Buffer : A_Buffer;

etc

I've used (and mandated) the "A_"/"An_" prefixes on a few projects and
it does work quite well and read fine.

I'll put my hand up and admit I _hate_ the noise of "_Type" - it
really ought to be clear and unambiguous from language rules but
isn't. :-(

Cheers
-- Martin
.



Relevant Pages

  • Re: Suffix _T for types found good
    ...   aBuffer: Buffer; ... Ray, on the issue of small routines, yes, *perfect* code is only ...
    (comp.lang.ada)
  • Re: Column width in Excel 2003
    ... It lets you specify a "buffer factor" value to ...   Dim R As Range ... Excel 2000 he would just double click on the right hand side of the top of ...
    (microsoft.public.excel)
  • Re: Column width in Excel 2003
    ... It lets you specify a "buffer factor" value to ...   Dim R As Range ... Excel 2000 he would just double click on the right hand side of the top of ...
    (microsoft.public.excel)
  • Re: Specs on microwave power divider/combiners
    ...  I'm curious how they decide to specify its frequency ... Some more clues can be found in the Power Splitter FAQ at: ... Q. Can performance parameters be traded off when specifying ...   power splitter/combiners? ...
    (sci.electronics.design)
  • Re: Is there a call-NEXT-next-method, or casting in CLOS?
    ... In this case the specializers list is just a list of the class c1. ... and I did not know how to specify the un-typed second argument. ...   ...
    (comp.lang.lisp)