| Kevin Gallagher wrote:
>
> Is it also true that gotos take a lot of time to process, especially in
> a-time?
The goto label is directly translated into an assembly language jump statement.
You know, ironically C code is first translated into assembly language before
being compiled into machine code. The whole speed thing is only of historical
interest. There was a time when programmers who really knew assembly could
generate faster instructing code than a typical C program. This is no longer
true, as smarty pants C compilers make better optimized assembly language than
any group 'o code miserly assembly language programmers:)
So, why is Csound so old:) ? Anyway, my .02 about expanding the language. How
about this...
if(sunny){
make_hay();
}
else{
work_inside();
}
This code needs a compiler that operates like a macro, translating it into the
older style Csound code before it executes. First inline the procs, then change
the if else statements into goto labels, add in assignments, and after some
time, voila, a C extension. BTW with the above notation another compiler could
do pascal, C++, ... It's lots of work and not much fun to make a compiler
though, it being among my least favorite and most difficult courses in college:)
--
Michael Coble::Director, Client Engineering::24/7 Media, Inc.
Digital Art Gallery, http://www.panix.com/~coble/
Music, http://www.panix.com/~coble/Coble/music/ |