Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > A language-agnostic language

Reply
Thread Tools

A language-agnostic language

 
 
Ed
Guest
Posts: n/a
 
      03-24-2006

An unGooglable.

Reading recent Eclipse posts, and hearing the contention between those
using Java 1.4 and 1.5, let alone between Java and C++, I'd have
thought that we'd have, by now, another layer of source code, beneath
that which we construct in our editors, yet above any
machine-executable.

It shouldn't be impossible define an object-oriented language entirely
in XML (for example). Thus, when your favourite editor opens a source
code file, it could ask how you want this XML language
human-interpretted (as opposed to machine-interpretted). You could, for
example, have the editor display the code as Java. You'd then edit and
update the code as Java, and compile it, and run the byte-code.

Then later, a C++-fanatic colleague, could open the same XML file, but
chose to view it as C++. The editor would take care of the translation
(actually, "Translation," is a better word that, "Interpretted"), and
present the code to him as pure C++, which he can then edit and update
as C++, and he could think he's running and executing the native code,
though the editor (having previously been configured so) would actually
compile to byte code and run in a JVM (or vice-versa, a Javaer could
update Java code which is then compiled to native from the ensuing
XML). But that's not important to our C++er, he just wants to edit the
code and run the results, and that's what he sees.

Yes, there'd be library issues. Of course, java.util doesn't exist in
C++; but there's no reason why an intelligent translation-editor
couldn't be told the C++ library equivalents, so that they appear as
normal to a Javaer. An specifically, there's no translation that
couldn't be fully specified in XML.

Essentially: your choice of source-code need not limit that of others
working on the same code.

Does anyone know if such an experiment/undertaking/instanity has been
investigated?

..ed (listening to Coldplay's, "Yellow")

--
www.EdmundKirwan.com - Home of The Fractal Class Composition

 
Reply With Quote
 
 
 
 
Mike Schilling
Guest
Posts: n/a
 
      03-24-2006
This is somewhat similar yo .NET, in which several langauges (C#, VB.NET,
managed C++, J#, etc.) are compiled into the same intermediate language
(MSIL), and could in principle be decompiled into a different language than
the original source. In practice, of course, it's somewhat trickier than
that, since not all languages provide the same set of types and constructs.
For example, what happens when your C++ buddy uses destructors, operation
overloading, automatic objects, unions, etc. and now you want to display his
code as Java?


 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      03-25-2006
On 24 Mar 2006 15:15:11 -0800, "Ed" <(E-Mail Removed)> wrote,
quoted or indirectly quoted someone who said :

>
>Does anyone know if such an experiment/undertaking/instanity has been
>investigated?


see http://mindprod.com/projects/scid.html

I see the future of language evolution more off as display rather than
ASCII representation as a stream of characters.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
 
Reply With Quote
 
JeffLowery
Guest
Posts: n/a
 
      03-25-2006
something like a XAML or XUL XSLT transform script to
language-of-choice? That would only handle the UI, though... but would
you really want to write logic in XML? Data structures are a little
more palatable, and mapping languages in Castor/JAXB/JIBX etc. do
something like this already.

But logic statements in XML? Yuck!

 
Reply With Quote
 
JeffLowery
Guest
Posts: n/a
 
      03-25-2006
Holy crap! It's been done:

<canvas>

<simplelayout spacing="5"/>

<class name="box" height="100" width="100" bgcolor="red"/>

<class name="borderedbox" extends="box"
onmouseover="this.changeSize(50)"
onmouseout="this.changeSize(-50)">
<attribute name="bordersize" value="3"/>
<view bgcolor="yellow"
x="${parent.bordersize}" y="${parent.bordersize}"
width="${parent.width - parent.bordersize*2}"
height="${parent.height - parent.bordersize*2}"/>

<method name="changeSize" args="pixels">
this.animate("width", pixels, 500, true);
this.animate("height", pixels, 500, true);
</method>
</class>

from OpenLaszlo. Although to my mind it's more of a language embedded
in XML, not so much a language in XML syntax.

So, how would this go? Lex/Yacc programming language X to agnostic XML
representation Y using mapping M in XML mapping language Z (sub X)?

There's no problem can't be solved by adding another layer of
indirection.

 
Reply With Quote
 
Luc The Perverse
Guest
Posts: n/a
 
      03-25-2006
"Roedy Green" <(E-Mail Removed) > wrote in
message news:(E-Mail Removed)...
> On 24 Mar 2006 15:15:11 -0800, "Ed" <(E-Mail Removed)> wrote,
> quoted or indirectly quoted someone who said :
>
>>
>>Does anyone know if such an experiment/undertaking/instanity has been
>>investigated?

>
> see http://mindprod.com/projects/scid.html
>
> I see the future of language evolution more off as display rather than
> ASCII representation as a stream of characters.


You mean like Labview?

--
LTP




 
Reply With Quote
 
Mike Schilling
Guest
Posts: n/a
 
      03-25-2006

"JeffLowery" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> something like a XAML or XUL XSLT transform script to
> language-of-choice? That would only handle the UI, though... but would
> you really want to write logic in XML?


My experince with Ant suggests that the answer is "NO!!!!".


 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      03-25-2006
On Fri, 24 Mar 2006 18:12:36 -0700, "Luc The Perverse"
<(E-Mail Removed)> wrote, quoted or indirectly
quoted someone who said :

>> I see the future of language evolution more off as display rather than
>> ASCII representation as a stream of characters.

>
>You mean like Labview?


I am not familiar with LabView. I see programming in future more like
filling in dialog boxes and ticking things off. I also see people
heavily customising the way they view the code, using dozens of
different ways of looking at the same code depending on the current
task, lots of ways of filtering out what is temporarily irrelevant or
highlighting what is, making it easy to compare things that in current
code are not adjacent.. The code becomes a structured graph of nodes
in a database, not an ascii text string.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
 
Reply With Quote
 
JeffLowery
Guest
Posts: n/a
 
      03-25-2006
I actually like ANT, but I have no explaination as to why. Maybe
because I've stared too long a make files in the past.

 
Reply With Quote
 
JeffLowery
Guest
Posts: n/a
 
      03-25-2006
People have been anticipating that for a long time, though. Problem is,
most businesses have really particular ways of doing things different
from other businesses, requiring clever thought on the part of the
implementor. I don't think outsourcing will go wholly overseas because
of that: you almost have to coexist iwth a customer (or have a really
good resident expert) to understand the unique aspects of business.

(but I digress...)

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Another crazy new language effort - Language #42 xyzzybill@gmail.com C Programming 28 02-01-2009 11:46 AM
writing a compiler for Monster language using C language Shravani C Programming 8 03-16-2008 09:36 PM
c is a low-level language or neither low level nor high level language pabbu C Programming 8 11-07-2005 03:05 PM
Using a Scripting Language as Your Scripting Language DaveInSidney Python 0 05-09-2005 03:13 AM
Python is the best and most popular general purpose scripting language; the universal scripting language Ron Stephens Python 23 04-12-2004 05:32 PM



Advertisments