Go Down

Topic: Alignment (Read 2 times) previous topic - next topic

GoForSmoke


Quote
What about the sideways compatibilities?

What about comprehensibility? There is a special place in hell reserved for macro writers.


Where they have to debug tons of that kind of code without any help and a boss down their neck?

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

drewfish

Hehe... yeah I agree that macros such as I posted here are a really bad idea for any code that is intended to be maintained. The code I posted wasn't intended to be maintained, but just a quick one-off to gather real-world info on data type sizes and alignments. Sorry, I won't inflict my cleaver macros on y'all again  :)

(BTW I think simple macros do have their place. For example the Arduino API has quite a few.)

pYro_65


(BTW I think simple macros do have their place. For example the Arduino API has quite a few.)


I Agree, however rendering valuable names in every namespace unusable was a terrible choice ( Arduino API ).
I'm sure somebody may want a class with members called min, or max.

Or at least the possibility of overloading them ( if they were a real function ).

Go Up