Re: (No Subject)
- Posted by Michael Bolin <michaeltom at GEOCITIES.COM> May 26, 1998
- 1065 views
> [ Euphoria Compiler ] > Martin wrote : "I'd be interested in the details. It seems to me that the > engine that produces the code for the interpreter to send to the CPU could be > easily modified to send the code to a file ins > ead. Wouldn't that be a compiler?" > I think people miss the main reason why Euphoria can't be compiled: The > Sequence. It is a flexible dynamic data structure. Compiling a data structure > defined and manipulated as the program runs, in > esponse to it running, is impossible. Try writing the compiler that can do > this: > s = append(s, s[v] & s[j..floor(length(s)/2) + x] ) > or something even more abstract. No, it's not impossible; a compiler can be written that can do anything the interpreter can. Moreover, even a straightforward Euphoria compiler would provide a 2-3x increase in speed for most programs. Error-checking would not be necessary in a compiler, as the program could be debugged using the interpreter beforehand, and as long as the programmer keeps his source code he could change it any time. Writing a compiler, though, is not a task to do from scratch; you would need the source code for EX.EXE to do it. Regards, Michael Bolin