Go Down

Topic: Alignment (Read 2715 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?

Nick Gammon on multitasking Arduinos:
1) http://gammon.com.au/blink
2) http://gammon.com.au/serial
3) http://gammon.com.au/interrupts

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
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy