LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-28-2011, 08:20 AM   #1
sauravrukd
Member
 
Registered: Nov 2011
Posts: 39

Rep: Reputation: Disabled
about using platform independent programming language


While programming in any programming language we call lots of inbuilt sub-routines of Operating system. Different operating systems might have different names and structures as well as different ways of passing parametres for those inbuilt sub-routines... Some O/S might not even have inbuilt sub-routine to perform a particular job....

People call java as platform independent programming platform.. How are the above issues addressed on JAVA programming....I am asking this question here because i feel java and linux are quite close
 
Old 12-28-2011, 03:19 PM   #2
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
Actually ... they aren't.

A "platform independent programming language" will be any language for which there is a runtime-environment available for your particular operating system of choice. (Could be Windows, could be Macintosh, could be Linux, could be a mainframe computer, could be a microwave oven. Really.)

This "runtime environment," as I call it, actually is a native program (usually written in C/C++) that is designed for that particular OS, and which implements the functionality of the language ... i.e. the ability to carry out programs written in that language. Java certainly is such a language ... but so is Perl, Python, PHP, Ruby, Haskell, Lisp, Prolog, JavaScript ... well, you get the idea.

The method that all of these systems employ to represent the program and to carry it out is called, variously, p-code or bytecode, which you may envision as being "the machine language of a hypothetical machine," said machine being implemented in software ... namely, in the runtime-environment executable.

Each of these languages implements some capability of invoking executable code (in libraries ...) that is not written in that language. The requirements that the runtime environments impose upon such libraries vary from implementation to implementation. (They will, for example, insist that subroutine parameters must be passed in some certain way, e.g. stdcall on Microsoft Windows.)

Fact is, most language systems are implemented in just this way, because the "overhead" of running a p-code interpreter is truly negligible, while the advantages are many. The "80/20 rule" certainly applies here: 80% of the time is spent in 20% of the program. Considerable effort is devoted to designing an efficient p-machine and an efficient implementation of that machine. Execution speeds that are "inconsequentially less-than pure native speed" can be obtained, and the result is platform-independent.

Last edited by sundialsvcs; 12-28-2011 at 03:23 PM.
 
1 members found this post helpful.
Old 12-29-2011, 09:40 AM   #3
sauravrukd
Member
 
Registered: Nov 2011
Posts: 39

Original Poster
Rep: Reputation: Disabled
thanx
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Future of Python programming language on a Linux platform LXer Syndicated Linux News 0 08-19-2011 12:41 PM
Beginner programming language for writing a cross-platform Graphical app? Romanus81 Programming 31 08-06-2009 12:26 AM
Simple Cross-Platform programming language? Romanus81 Programming 13 04-07-2008 07:57 PM
Platform independent Korganizer xri Linux - Software 3 02-22-2008 05:00 PM
platform independent anoop ss Linux - General 2 08-23-2007 02:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration