![]() |
| | #1 |
| Registered User Join Date: Feb 2008
Posts: 93
| about aliasing |
| Kempelen is offline | |
| | #2 | |
| subminimalist Join Date: Jul 2008 Location: NYC
Posts: 3,946
| Quote:
BTW, you can use global variables, the caveat is not to become dependent on them and to use them as little as possible by reserving them only for important, often accessed variables and situations where NOT doing so would hamper efficiency or comprehensibility. For example, some API's allow callbacks where the callback can only be passed a single variable. You can always create a struct to include more, but if each one of these structs is unique in the sense that it is always variable X + some other variable, and X is getting passed around between a lot of your functions this (or any) way, you you might reasonably consider making X global if the total code base is only a few thousand lines or so.
__________________ Accuracy and integrity mean nothing if you don't make it past the censors...PYTHAGORAS | |
| MK27 is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Typesafe, generalized aliasing | CodeMonkey | C++ Programming | 15 | 12-13-2008 09:52 PM |
| Anti aliasing | arjunajay | Windows Programming | 7 | 08-15-2006 08:24 PM |
| pointer aliasing | moi | C Programming | 2 | 02-21-2006 11:08 AM |
| anti aliasing | muttski | Game Programming | 2 | 03-16-2002 06:55 AM |