Re: Poll: global buffers

From: Del (caminturn@earthlink.net)
Date: 07/20/01


George Greer wrote:
>
>
> You mean local functions not shadow the global names? As in make their own
> names not be 'buf'?
>

Yes, I can not remember currently if this is something in stock (probably
not), but the local names buffer names should never be buf, if you're using
globals. I learned the hard way :)

> >If I am miss-understanding what there true purposes is, please
> >let me know :)
>
> Their true purpose was to avoid having to define your own buffers for every
> function since everything seemed to need some sort of buffer to work with.
> The theory was that it would be faster on the programmer and computer if it
> kept the 32 kilobytes worth of 4 buffers always allocated instead of
> created on demand.

To be honest, I have never worried about performance issues with code. There
does not seem to be any issues with the way they are handled at the moment.
I can see from some of the responses that globals are tought to be bad
programming, but not why?
I personally like them. If performance is an issue, it would seem to me
that having globals handle stuff like message (send_to_xxxx) which is called
so ALOT, would be benificial to performance. Rather than recreating a buf each
time a function is called.
Just my oppinion.

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/06/01 PST