Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any disadvantages to a language being platform independent?

I'm working on a paper about multi-platform programming and I'd like to include sections on advantages/disadvantages. From my understanding; having any application be multi-platform is a huge selling point for the developer since it enables almost any computer user as a potential buye, among other things. I'm just trying to figure out possible disadvantages. If any?

like image 609
Josh Avatar asked Feb 14 '10 16:02

Josh


People also ask

What are the advantages of platform independent language?

Few developers are experts in multiple programming languages, making it difficult to perfectly match the look and feel of two or more apps. Because platform-independent apps run on a single code, it is easier to maintain consistency in appearance and function across different devices.

What are platform independent languages?

Java provides a way to write applications independent of the hardware and operating systems. Thus, it is called a platform-independent programming language.

What languages are not platform independent?

In case of C or C++ (language that are not platform independent), the compiler generates an .exe file which is OS dependent. When we try to run this .exe file on another OS it does not run, since it is OS dependent and hence is not compatible with the other OS.

What is independent language?

An independent language learner is someone who is in control of their own learning. They don't rely on a teacher to learn a new language or to improve their language skills. They make choices about what they want to learn, and how.


2 Answers

Generally on a multi-platform environment you will need an additional level of abstraction between the language and the machine such as an interpreter or the JVM. This additional level tells the specific machine how to run the code in its environment and brings more code that your computer has to run to handle a given set of instructions. Because of this, multi-platform applications are generally slower.

The logic behind this is instead of coding the same application many times for each environment, you create an interface of sorts for coders to program for. Each platform needs its own implementation of this interface but is intended to run code in a uniform way.

Also, while this layer is intended to provide universal behavior on multiple platforms you may still need to take into consideration differences in naming conventions and file storage from one platform to another.

Web browsers are the most widespread example of this. If you have a good browser, it interprets web standard code (HTML/CSS/JS etc) and takes care of how to display it on your particular platform instead of the code writer needing to accommodate for these differences.

like image 162
hqrsie Avatar answered Jan 03 '23 06:01

hqrsie


Are there disadvantages to a language (asked in the title) being platform-independent?

As a language implementor, I have to say that making something run on multiple platforms is a lot more work. Most of the extra work is in the run-time system. Making something platform-independent is even harder; you have to stick to some very widely used standard like ANSI C.

I should add that you don't necessarily have to write a lot of code; you just have to think harder. Lua is a good example of a platform-independent language without a monster large implementation. GHC is the opposite: lots of code to get great performance on many platforms—but the run-time system alone is four times the size of version 6 Unix!

like image 44
Norman Ramsey Avatar answered Jan 03 '23 07:01

Norman Ramsey