Re: Suffix _T for types found good



"Peter C. Chapin" <pcc482719@xxxxxxxxx> wrote in message
news:4899d2af$0$19731$4d3efbfe@xxxxxxxxxxxxxxxxx
amado.alves@xxxxxxxxx wrote:

Regarding "_T" vs. "_Type" I am convinced the former is better but I
have to leave the advocacy for later. Or for others ;-)

Personally I prefer _Type. Yes it is more verbose but it follows the
convention of using fully spelled out words for things. For access types I
have used _Pointer. As in

type Integer_Pointer is access all Integer;

It mostly seems to work for me.

I go with _Type too, but for pointers I go with _Acc.

For years the convention at work (I'm not sure where it came from) was to
precede type names with a lower case "a" or "an" so a declaration would be
something like:

index : anIndex;
buffer : aBuffer;

Since I used the convention for years I can say it helped readability a lot,
but every once in a while I did run into cases where I would want a variable
name to start with a or an and would have to choose something different, or
accept some "different" looking code.

Regards,
Steve


.



Relevant Pages

  • Re: Suffix _T for types found good
    ... Yes it is more verbose but it follows the ... convention of using fully spelled out words for things. ... For access types I ... packages had a consistent feel. ...
    (comp.lang.ada)
  • Re: [Attn: Randy] COM calling...
    ... DirectX uses - hands me "pointer to r" rather than just "r" and all of ... program were still to work with "demo: pointer to r" then that's ... of offset "equates" to do something similar and ignore the HLA ... a "record" of DWORDs and then all the "calling convention" stuff I ...
    (alt.lang.asm)
  • Re: NULL macro vs. 0 as null pointer?
    ... It's a convention, and a convenient one. ... to be assigned to a pointer. ... a different meaning that an integer assignment. ... special macro to make it clear to the designer and maintainer. ...
    (comp.lang.cpp)
  • Re: Espresso in Downtown Denver?
    ... Can you help a fella with a pointer to someplace ... near Convention Center (well, within a looooong walk) where I can pick ...
    (alt.coffee)
  • Re: [PATCHSET x86/master] add stack protector support for x86_32
    ... pointer to pt_regs instead of assuming that the struct was passed by ... Getting a new call convention recognized ... is a 3 years timeframe project for a whole team of hackers. ... pointer is a 30 minutes project for one good kernel hacker;) ...
    (Linux-Kernel)