Re: GoTo in Java



Oliver Wong<owong@xxxxxxxxxxxxxx> 01/25/06 2:34 PM >>>
>"Michael Wojcik" <mwojcik@xxxxxxxxxxx> wrote in message
>news:dr86lm018pk@xxxxxxxxxxxxxxxxxxxx
>>
>> I've seen countless lines of C++
>> struggling to perform what could be done with far less effort - and
>> far fewer bugs - in OCaml.
>
> I played around with a .NET introspection tool. For any given code
>compiled to the .NET platform (regardless of what language it was
originally
>written in), the tool could decompiled the bytecode into C#, VB.NET or
MSIL.
>
> 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
>(with sufficient computational power -- I'm not expecting miracles like
>running Windows XP on my wristwatch), and then be decompiled in this
>fashion.
>
> Availability of software would no longer be a problem or factor in OS
>selection.
>
> 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.
>
> 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.

Now that sounds really cool! It would be cool even without the "reverse
compile" to a different language. Really, if there was a linkage convention
standard and name-mangling standard it seems to me that a library written in
any language should be accessible from any other language. Of course the
documentation might be hell:

Example C Code:
Example C++ Code:
Example Java Code:
Example COBOL Code:
Example Fortran Code:
Example Python Code:
Example Perl Code:

:-)

To the OCaml guy: What is it specifically that you like about OCaml? Is it
the "functional programming" methodology, the syntax, what? The wikipedia
page http://en.wikipedia.org/wiki/Ocaml says it's popularly used for:

Computer science
- Theorem proving (e.g. Coq, HOL Light, MetaPRL)
- Computer program analysis (CIL, C Code Analyzer)
- Compiler writing (Ocaml compiler, Felix, MTASC)

Natural science
OCaml is also widely used in physics, chemistry, biology and, more recently,
bioinformatics:
- Analysis
- Visualisation

I don't see anything about financial systems and business rules programming
in there, which is COBOL's strength. Do you envision OCaml being used in
the same places as COBOL, or do you just like it for other reasons?

Just wondering. Personally I don't yet understand "functional programming",
but then I haven't made any attempt to learn it. Is it worthwhile in and of
itself, specific languages aside?

Frank


---
Frank Swarbrick
Senior Developer/Analyst - Mainframe Applications
FirstBank Data Corporation - Lakewood, CO USA
.



Relevant Pages

  • Re: GoTo in Java
    ... > To the OCaml guy: What is it specifically that you like about OCaml? ... It supports agile programming by offering an interactive interpreter, ... and other factors than on language, but Jon Harrop in particular has ... proper functional programming ...
    (comp.lang.cobol)
  • Re: Very poor Lisp performance
    ... > I find that the same typeful programming style (and pattern matching, ... And OCaml is a great language for many tasks, ... this Lisp language... ...
    (comp.lang.lisp)
  • Re: ANN: Q language website (new)
    ... > be simpler than in any other language. ... You do enjoy your OCaml, ... Object-oriented programming has the buzz that ... > You need to be careful when you use the word "polymorphism" as it means ...
    (comp.lang.misc)
  • Re: Future of C#
    ... find suggests that its use is web programming first, ... a systems language used to write OSs and drivers. ... Java is probably the most widely used language that I am aware of. ... OCaml: 726 ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: RAD vs. performance
    ... exactly the same for a dynamically typed language as it is for Ocaml? ... general philosophy behind dynamic typing, ... it doesn't matter if it complains at compile time. ...
    (comp.lang.misc)