Re: Aspects of programming languages in common
From: James Rogers (jimmaureenrogers_at_att.net)
Date: 04/16/04
- Previous message: Ian Woods: "Re: 8-puzzle jigsaw variant"
- In reply to: Malcolm: "Re: Aspects of programming languages in common"
- Next in thread: James Harris: "Re: Aspects of programming languages in common"
- Reply: James Harris: "Re: Aspects of programming languages in common"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 15 Apr 2004 23:41:42 GMT
"Malcolm" <malcolm@55bank.freeserve.co.uk> wrote in
news:c5n2v6$jc5$1@news6.svr.pol.co.uk:
>
> "James Harris" <no.email.please> wrote in message
>>
>> The basic question is, What prevents these mainstream languages
>> being translated to an intermediate form as proposed?
>>
> It happens already. A lot of language suites consist of front ends for C,
> C++, FORTRAN etc, and then a common optimiser and library system for the
> back end.
>
I don't think that is exactly what the OP is talking about.
A lot of languages are translated into C and then compiled through
a C compiler. They undergo a syntax evaluation before being
translated into C.
My understanding of the proposal is to perform the translation to
a "neutral" language before performing any syntax checks. The
problem with that proposal is that the translation itself must
involve at least a high level syntax check. For instance, if
you are programming in Pascal and containing Cobol code, the
translator could fail.
The bigger question, even if one could achieve what the OP
proposes, is the question of value. If the "neutral" language
syntax check identifies an error, how will that be properly
communicated to the programmer in terms of an offending line
number in the original source code? There will not always be
a one-to-one mapping between original source lines and
intermediate code lines.
For instance, the Korn shell "select" loop generates and
manipulates a menu. If that command is translated to
equivalent C code the C code will require many more lines
than the original Korn shell source code.
Jim Rogers
- Previous message: Ian Woods: "Re: 8-puzzle jigsaw variant"
- In reply to: Malcolm: "Re: Aspects of programming languages in common"
- Next in thread: James Harris: "Re: Aspects of programming languages in common"
- Reply: James Harris: "Re: Aspects of programming languages in common"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|