Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Re: Re: Re: Re: Re: Re: Re: New JAVA Specification

by diotalevi (Canon)
on Jun 17, 2003 at 20:43 UTC ( [id://266640]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: Re: Re: Re: Re: New JAVA Specification
in thread New JAVA Specification

All of the languages C, C++, Java, Perl, BASIC are compiled. their source code is read by a lexer/parser and transformed into another form. BASIC (ok some forms of BASIC that I've been told do this) would be an interpreted language because it uses an iterative approach to the source - each line is individually read, parsed and executed. C and C++ are both compiled to another source code format - assembler which is itself compiled to serialized machine code targetting a particular processor. When I look at Java, Perl and emacs I see a similarity in that each compiles to an internal abstract form which is then executed by a virtual machine.

I don't privilege the implementation of the virtual machine so that having an intermediate serialization of the compiler output separates one implementation from being scripted and the other not.

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Re: Re: Re: Re: New JAVA Specification
by djantzen (Priest) on Jun 17, 2003 at 21:17 UTC

    Well okay, but then why privilege the distinction between VM and hardware? They're both targeted architectures after all. I think a critical distinquishing characteristic of an interpreted language is that the stages of lexing/parsing/emitting VM specific code/runtime are not strictly separate from one another, but the program can move between them at will via the likes of eval. In Java the separation of those steps is enforced not just in the de facto separation of tools, but in the way the language is intended to work. You compile, and only then do you run.


    "The dead do not recognize context" -- Kai, Lexx

      No... I think the VM provided by my hardware is a distinct enough component that it is a good place to draw one sort of dividing line. The distinction between compiler and execution environment is blurry when you consider the various non-(hardware)-machine code languages like Perl, Python and Java. I suppose if you wanted to be ultra pedantic you could note that hardware is also a VM because things like ix86 are actually an API to whatever the hardware actually executes which itself can be an API, etc.

      I don't think the meaningful thing is on whether the language has an eval-like construct. That is more about language design than it is about scripting language delineation. In fact, is there anything stoppping a person from implementing eval in Java? Certainly you can manipulate Java source code from within a Java program. You can execute the compiler - I'd just wonder if it is possible to load classes during runtime (and I suspect it is).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://266640]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-03-29 06:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found