RE: nasm over gas?

From: Mehmet Ceyran
Date: Fri Sep 05 2003 - 10:39:11 EST


>> Error-checkers like Lint, that use a specific langage such
>> as 'C', can provide the programmer with a false sense of
>> security. You end up with 'perfect' code with all the
>> unwanted return-values cast to "void", but the logic remains
>> wrong and will fail once the high-bit in an integer is set.
>> So, in some sense, writing procedures in assembly is
>> "safer". You know what the code will do before you run it.
>> If you don't, stay away from assembly.
> This is part of what makes someone a 'real' programmer, in my opinion.
> In my experience, 'Unreal' programmers tend to excessively
> re-use code from other applications they've written, and just
> hack it about until it works, at times leaving in code for
> features that are never used in the new context :-).

Code re-usage is not a bad thing in computer science because it can save
you much work. But it has to be done correctly. Best thing is to use
so-called "design patterns": Solutions to common problems that have been
proven to work in many different environments. So if you solved some
problem in your past programs (of course specifying it well before) and
you prove that it doesn't work only for that particular program, then
there's no need to reinvent the wheel. For example that's why you use
standard libraries for basic operations like output to console.

You're right in the part that one should not have to hack the re-used
code until it works because that leads to dirty coding.

I'd also like to mention that algorithms implemented in high-level
languages can be mathematically proven too, for example with the hoare
calculus, which provides basic axioms for handling of sequences, loops
and conditional statements.

Mehmet

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/