![]() |
|
#1
|
|||
|
|||
A universal compilerI am just speculating my imagination that whether at all, is it possible to build a universal compiler....??
For example, if i am programming in c( I use turbo c++ 4.5), is it possible to embed java code and some other language so that when the program gets executed....the java code gets executed simultaneously as the remaining c code...!! Or, if i figure it in this way...If we have one environment in which compilers of java, c, perl, pyhton are linked together...and when a program is written containing multiple codes of different languages....it gets executed accordingly.....!!! If a program needs to use some properties of java programming, can it borrow packages from the java repository as we link header files in c, can the codes in java be intermixed with those of c....to provide a better(not best to be stated) running program and a far efficient software.I need to state in an ethical manner that nothing is impossible, then building this ultimate coding machine should not be infeasible from an amateur programmer's view at least...!! Sorry for my ignorance, i am a newbie...and quite new to programming....!!! looking for a reply, Nishant |
|||
|
#2
|
|||
|
|||
Re: a universal compiler...!!!Java is compiled to bytecode that ultimately uses the system it runs on to handle its dirtywork and can therefore be run on several systems.
C is compiled to binary specific to a particular system. Perl and python are interpreted, there is no compilation process. Furthermore, there is the problem of language - this is a well developed field; google formal grammar for the gory details. Basically you have the problem of constructs (even if you manage to overcome the syntactical differences). For instance, how would a Java class use global data from a C program? If you eliminate the global variable situation you still have the problem of scope. Suppose you compile a c++ portion of the program and wrap a section of code in a particular namespace, this is obviously local to the resulting binary, what happens when the JVM wants to utilize this namespace? Since it defers to the host system to execute binary code this c++ section would need to exist in a separate file (or at least in a location that could be loaded by the JVM). The things you propose, on the surface, seem plausible because it would be convenient for you the programmer. However, the details of the implementation much outweigh the benefits provided. __________________
My personal site: Utilities for text processing, debugging, testing and plotting |
|
#3
|
|||
|
|||
Re: a universal compiler...!!!Quote:
Some say that Microsoft's move to forcing all of their languages to write to their own intermediate language is both brilliant & asinine at the same time. Yes, it does make it possible to splice C, C++, C#, & Visual Basic code together, & there may be some behind-the-scenes benefits as well, but by forcing C & C++ code to place in the IL soup, inline assembly language is no longer possible. There are trade-offs to managed code. The reason languages are implemented differently is because they have different goals, & language designers make decisions based on various tricks & constraints. Making everyone play by the same rules doesn't always take into account why implementations were different in the first place. |
|
#4
|
|||
|
|||
Re: a universal compiler...!!!From my personal point view, the footprint will be increase and from the economical point of view, its not evident to have one "universal" compiler. A more economical way is the ideology to portability of software design.
|
|
#5
|
|||
|
|||
Re: a universal compiler...!!!Quote:
Quote:
|
|
#6
|
||||
|
||||
Re: a universal compiler...!!!Quote:
Amazingly you fail to recognize that your statement is exactly Microsoft's business plan! Step 1: Do whatever you can to make the software world belong to Microsoft. Step 2: Do whatever you can to ensure that no other software works with Microsoft software. Step 3: Prevent all competition from securing a foothold in the marketplace. Step 4: Ensure that continual upgrades are a requirement. Step 5: Make the hardware vendors bow toward Redmond before any can be sold. MxB |
|
#7
|
|||
|
|||
Re: a universal compiler...!!!Quote:
Maybe you can enlighten me how Universal Compiler resolves the "One Vendor" problem. Quote:
This means universal compiler will become problems of problems. |
|
#8
|
|||
|
|||
Re: a universal compiler...!!!Quote:
Quote:
The assumption you are making is that "Hey! why should I have to reinvent a statistical library because Fortran had LINPACK? Why should I have to reimplement GUI libraries because Java has Swing?" The answer is to become fluent enough in different languages & proficient as an engineer such that you choose the tool which best solves the problem. Invariably, really useful libraries get ported to multiple languages, & if you can't find what you want, write it yourself. |
|
#9
|
|||
|
|||
Re: A universal compilerany present compiler for it now ???
|
|
#10
|
|||
|
|||
Re: A universal compilerQuote:
No. But u can google for U++. http://www.ultimatepp.org/ |
Recent GIDBlog
Programming ebook direct download available by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| my code has errors.. HELP | bengt23648 | C Programming Language | 5 | 18-Aug-2007 10:48 |
| Online C Compiler. | shoaibjameel123 | C Programming Language | 5 | 10-Jun-2007 00:50 |
| C++ Compiler Reads C Source Codes | eddykk | C Programming Language | 2 | 15-Apr-2006 09:23 |
| Newbie : need help with Dev-C++ compiler | batrsau | C++ Forum | 2 | 20-Mar-2005 22:05 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The