3 ms·
This is not criticism, but I'd just like to point out that the farther you get from the raw realities of the efficiency of C-style code you increase the probabi
by robomartin 14y ago
This is not criticism, but I'd just like to point out that the farther you get from the raw realities of the efficiency of C-style code you increase the probability of code becoming bloated with constructs and "rigging" under the hood that's there just to make things convenient to a programmer. At one point or another there is no escaping the reality that pointers will end-up as addresses in a register used to make an indirect call or "MOV" of some sort and that other data types will similarly land on registers or various memory areas as they are passed to and from functions. I got my start writing machine code (not assembler, but entering raw hex codes into hexadecimal keypads) and that caused me to always be very aware of where I am just being lazy and loading things-up with code just to make my life easier. Granted, sometimes this is justified.
Today's coding tools (editors and IDE's with code completion and "live" API reference) make it harder to screw some of this up. I tend to always go for simple, fast and efficient. But that's my preference.
- Xcelerate 14y agoOh, I certainly agree. I have different projects with different goals. I've spent some time eking out every ounce of performance for a Newton-Rhapson division routine in assembly. But then there are some high level things that I think lead to more elegant (and ultimately simpler) programming. Clojure for example isn't particularly close to the hardware, but it leads to better coding practices that result in easier long term maintenance, less bugs, etc. I think a good balance would be to take a well designed language and add an option for high-performance code when needed. C and C++ do this with inline assembly (although I don't know that anyone would call C "elegant"). It would be nice if more higher-level languages added this ability.