Re: C to Eu translator

new topic     » goto parent     » topic index » view thread      » older message » newer message

Andy wrote:

>> How about only translating things that are safe and clear to do,
>> e.g. replacing all symbols such as "//", "==", "++", "&&", "||", "~",
>> and other stuff, thereby letting the C constructs that are not available
>> in Euphoria such as goto, setjump, pointers, pass-by-reference,
>> structures, etc. alone?
>>
>> Then only the rest of the C program must be converted manually. Do you
>> think that there are many C programs, where this would save a
>> considerable amount of time, compared to converting the whole program
>> manually? Or is it not worth the effort, to write such a
>> "semi-translator"?
>>
>
> Well, what is the ultimate purpose?  If you're doing something like the
> COM library or something where it is actually useful to mimic the
> C-style, then ok.
>
> But you were talking about trying to learn from the code, but not
> understanding what it is doing.

Yes, trying to learn the logic of the C code, without understanding what
it is technically doing, was my original intention. But you and Derek
already had convinced me, that this wouldn't be possible.

> If you have to do the important (hard)
> parts of the translation manually, you'll have to understand exactly
> what the C code is doing.  And once you understand that, it is much
> easier to just rewrite a Euphoria version from scratch (not a
> translation, but a re-expression of the same ideas in Euphoria) now that
> you know the things that need to be accomplished.
>
> You can't translate C without understanding C, bottom line.  And if
> someone else made an auto-translator for you, the resulting Euphoria
> code would be no easier to understand than the original code...

After Al's reply, I focused on a program, that might safe time, as Al
wrote. And I didn't talk about "auto-translation" any more.

Regards,
   Juergen

-- 
 /"\  ASCII ribbon campain  |  This message has been ROT-13 encrypted
 \ /  against HTML in       |  twice for higher security.
  X   e-mail and news,      |
 / \  and unneeded MIME     |  http://home.arcor.de/luethje/prog/

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu