[fpc-pascal] even linus torvalds prefer pascal over c
john at jcoppens.com
Sat Dec 2 20:11:52 CET 2006
On Sat, 2 Dec 2006 19:39:34 +0100 (CET)
Daniël Mantione <daniel.mantione at freepascal.org> wrote:
> However, assembler coded is not portable. A hand optimized Pascal
> based solution with goto statements might be preferable over assembler
> code. For example, in the file rtl/unix/video.pp , the procedure
> update_vcsa uses a goto for speed reasons.
Yes... I understand that, of course. But my arguments against this are:
1) Except the compiler writers, few people know what code is generated
for which source (should they know?). How do I know that a goto is
really translated as a jump? I'm no expert, I did see that in many
cases ifs, cases, whiles etc, are sufficiently 'recoded' by the
compiler such as to make it difficult to garantee that (or know if)
the goto is reached fast enough to matter.
2) Compiler semantic analysis is evolving (I imagine), so I'd suspect
that optimising is also improving continuously...
3) I also believe that gotos are somewhat like guns. If they're available,
it's more probable that people shoot themselves in the foot (or worse).
Mind, I don't want to remove gotos. I'm all for free choice. But I'm
still very much a proponent to discourage its use for fledgling
More information about the fpc-pascal