by e12e · 10y ago · 0 comments
I can't imagine the full C example for this is any prettier or easier to follow?
[ed: As for "no name mangling" - having such an easy way to turn it off when needed, and yet avoid collisions when you do need it seems pretty good to me. Perhaps just having something that's "extern" be umangled by default would be better -- but it's not like one needs to bend over backwards to get a "mostly safe" bare metal program here.]
Plenty of things I do are are word for word the same in C and python. (import math vs. #include <math.h> , math.sin(x) vs. sin(x), etc.)
It is when you want to build something more complex than a blinking light that the differences between languages come out.