Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 01 Oct 2014, 10:42
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Programing Languages
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
larryrl

Joined: 07 Oct 2010
Posts: 9

PostPosted: Thu 07 Oct 2010, 17:28    Post_subject:  Programing Languages
Sub_title: Frustrating
 

Why is it almost every programming language for linux must be compiled using a c++ compiler?
Back to top
View user's profile Send_private_message 
Mzg

Joined: 04 Oct 2010
Posts: 23

PostPosted: Thu 07 Oct 2010, 18:38    Post_subject:  

Um, only C++ can be compiled with a C++ compiler...
Back to top
View user's profile Send_private_message 
disciple

Joined: 20 May 2006
Posts: 6439
Location: Auckland, New Zealand

PostPosted: Fri 08 Oct 2010, 04:05    Post_subject:  

No, that's not what he means.
e.g. Python itself (not code written in the Python language) is written in C and compiled with ./configure; make; make install

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send_private_message 
Mzg

Joined: 04 Oct 2010
Posts: 23

PostPosted: Fri 08 Oct 2010, 11:03    Post_subject:  

That makes sense. I.e. the interpreters/compilers must be compiled, not the programming language.
Back to top
View user's profile Send_private_message 
disciple

Joined: 20 May 2006
Posts: 6439
Location: Auckland, New Zealand

PostPosted: Fri 08 Oct 2010, 21:43    Post_subject:  

Larry,
How else would you expect to build them?

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send_private_message 
gary


Joined: 21 Dec 2007
Posts: 87
Location: Cartersville, GA

PostPosted: Sat 09 Oct 2010, 11:42    Post_subject:  

Isn't C++ just a pre-processor for C anyway? That is, the pre-processor accepts C++ and rewrites it as C source, which is then further pre-processed into assembly source, then ultimately assembled into binary for the target CPU. Many "compilers" allow you to stop and examine the code generated at each stage. Using the pre-process technique, it seems to me nearly any language could be designed who's output would be C source code.
_________________
Hasten Slowly!
Back to top
View user's profile Send_private_message 
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Fri 15 Oct 2010, 03:13    Post_subject:  

Compiled languages need a compiler to compile them, and interpreted languages need an interpreter to interpret them. Those programs have to come from somewhere. Once you have a compiler for the language, you can of course write a new compiler for the language using the language itself. But before you reach that point you have a chicken and egg scenario. The simplest solution is to first write a compiler for the language in a different language that is already set up. The typical choice is C because it's pretty much the most common language you're going to find on nearly any platform. You write a compiler for your language using C, then you write another compiler for the language, this time using the language itself, and compile it using the compiler that was written in C. Now you are free from needing C, on this platform. However, if you want to make the language availible on another platform (like Mac or Windows, or an ARM processor, etc.) you'd have to either bring back the C version of the compiler so that it can be recompiled natively on the destination platform, or else implement a cross-compiler so that you can compile a compiler ahead of time.

If any of that is confusing, sorry. I should have gone to sleep a while ago.

_________________
Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0492s ][ Queries: 11 (0.0034s) ][ GZIP on ]