Re: GoTo in Java
- From: mwojcik@xxxxxxxxxxx (Michael Wojcik)
- Date: 26 Jan 2006 22:26:43 GMT
In article <S9SBf.194761$OU5.25957@clgrps13>, "Oliver Wong" <owong@xxxxxxxxxxxxxx> writes:
>
> It'd be nice if, in the near future, all programming languages could be
> compile to some platform neutral IL, which could be run on any hardware
I suspect most of us have heard that one before. Ah, OSF's ANDF. And
before that, UCSD's p-System. Java bytecode and MSIL are following a
well-trodden path.
Hmm, come to think of it, I know of a COBOL implementation that can
generate a platform-neutral intermediate language...
> Availability of software would no longer be a problem or factor in OS
> selection.
This seems rather optimistic. We've had this technology for decades.
Software availability isn't a technological problem; it's one of
marketing and consumer perception.
> The source code within a single file (or "compilational unit") could be
> written in a dozen different programming languages, and with a sufficiently
> smart IDE, you could just highlight any block of code and translate it to
> the language of your choice.
Compilation loses information. Decompilation can't put it back.
While you can decompile MSIL into C# and other .NET languages, you
aren't restoring everything that was in the source - you can't,
because MSIL doesn't capture everything that was in the source.
> You could write your simple OCaml code, and me, not being an OCaml guy,
> would highlight it, right click, and choose "View as Java", say to myself
> "Oh... so that's what this does..." and change it back and continue coding
> some other part of the system.
I think you overestimate the ability of the average programmer, or
for that matter the exceptional programmer, to interpret arbitrary
chunks of decompiled code. There is considerable literature on the
subject (or at least on "intelligent" decompilation), and it's not
what I would call encouraging.
And if this hypothetical system did encapsulate enough information
from the source code to make this plausible (which would have to
include, say, identifier names, and comments, and such), you'd have
intellectual property issues. There's already plenty of concern in
the software industry over decompilation of high-information formats
like Java bytecode and MSIL - that's why there's a healthy market
for obfuscators.
Not that this might not make some CS grad student a nice little
project. I think I'd take GCC, which has front ends for a bunch of
languages with a common back end, and turn it into a source-to-
source cross-compiler, then try, say, compiling Fortran into C++ and
see how legible I could make the result.
--
Michael Wojcik michael.wojcik@xxxxxxxxxxxxxx
"Well, we're not getting a girl," said Marilla, as if poisoning wells were
a purely feminine accomplishment and not to be dreaded in the case of a boy.
-- L. M. Montgomery, _Anne of Green Gables_
.
- Follow-Ups:
- Re: GoTo in Java
- From: Oliver Wong
- Re: GoTo in Java
- References:
- GoTo in Java
- From: Howard Brazee
- Re: GoTo in Java
- From: Richard
- Re: GoTo in Java
- From: Michael Wojcik
- Re: GoTo in Java
- From: Oliver Wong
- GoTo in Java
- Prev by Date: Re: GoTo in Java
- Next by Date: Re: GoTo in Java
- Previous by thread: Re: GoTo in Java
- Next by thread: Re: GoTo in Java
- Index(es):
Relevant Pages
|