Re: GoTo in Java




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_
.



Relevant Pages

  • Re: whats it worth to write a short program for polynomial multiplication?
    ... compile time, it is likely that the user will have to ... Most OO programming languages work that way. ... will also work on the POWER machines and related one. ...
    (sci.math.symbolic)
  • Re: Calling C++ function from VB
    ... you will be able to mix and compile different languages into the ... are a lot smarter in the new version. ... You can use different programming languages for ...
    (microsoft.public.dotnet.languages.vb)
  • Re: GoTo in Java
    ... Decompilation can't put it back. ... > While you can decompile MSIL into C# and other .NET languages, ... translatable-IL and publishable-IL, and decompiling from translatable-IL. ... >> You could write your simple OCaml code, and me, not being an OCaml ...
    (comp.lang.cobol)
  • Computer Languages
    ... the number of languages known to be spoken by the peoples of ... all the computer languages have sprung up in just 50 ... any pair of human languages. ... Almost all programming languages are built on the ...
    (soc.retirement)
  • Re: Why is OO Popular?
    ... This research allows us to understand the basics of understanding ... Another way of putting it is we can program different types of languages ... try to formalize them for programming purposes while the brain is much ... they don't like like dynamic programming languages. ...
    (comp.object)