![]() |
Just a few general programming concept questions that Google couldn't answer.
I'll preface this by saying it's okay to laugh if what I'm asking is a bunch of elementary stuff. None of it is syntax related, just trying to get a better grasp on certain concepts before I really get into the nitty gritty of learning a language.
I figured using a hive mind of good programmers was the best way to go. So my questions are this: 1. Why is one language better than another? For example, people might say C+ is better for visuals than Java. But why is that true? What makes goes into making them different? 2. I've heard reference to Coding languages being used as "Glue" acting as a overall construct, within which are aspects written in other languages. How does that work? How can a program start reading in a different language for a portion of it's processes? |
These aren't stupid questions at all. They're questions that should be asked as they differentiate between programming (knowledge of how to perform tasks with programming code) and languages (the tools chosen to implement that knowledge). Its like determining that you wouldn't use a screw driver to hammer in a nail, and frankly elementary is what many programmers often lack. So your questions are more than valid.
Choosing a language is all about the trade offs. What do you gain from choosing one language over another, and what do you sacrifice. Choosing C over Java provides you with a much faster application, but loses the ability for a direct cross platform application (specifically a GUI I'm thinking of). Choosing PHP in a web environment over C grants you much more rapid application development, at the cost of speed and low level control. Knowing what to sacrifice for something else simply comes from experience; I wouldn't write something in C to develop a new website, unless it was on a direct extension to PHP code (which is interpreted in C btw). This is because I'm well aware of how many websites support PHP code for their development, and how few will allow a direct extension to the currently existing PHP engine. Besides this, you must know the limitations of what a language is capable of doing; typical built PHP code cannot generate a GUI interface, Java and C are not capable of operator overloads, C is a procedural language, C# is object oriented, etc, etc. |
That's definitely very, very helpful. You're exactly the kind of person I was hoping would answer.
However, your explanation raises a few new questions 1. You mention the terms higher/lower level. How one programming language operates on a lower level? Does that mean in a manner closer to what the machine ultimately understands? 2. I understand JAVA is platform independent, but (In stuff like C) do things need to be recoded on different OS's? 3. Why can a langauge have the ability to generate a GUI while others don't? |
Quote:
Quote:
In some areas like GUIs if you write for the OS' native implementation then yes you would need to recode a lot to move say a Windows GUI to run on X11. However there are a number of GUI libraries you can use such as Gtk+, Qt and wxWidgets that will alleviate that problem. Quote:
|
Quote:
|
Yeah by APIs I meant libraries. Your analogy is more or less accurate. A library is a collection of code for a specific purpose.
|
A collection of code that is written in the respective language, right? I was reading on some site about multiple languages accessing the same API's and couldn't quite grasp who that was possible.
And just to clarify, code syntax is the same across all OS's then? It's just that some poor blokes at the Language developer has to get knee deep in a computer and create a compiler that can take then code and turn it into machine code for that OS? |
Quote:
Quote:
|
| All times are GMT +1. The time now is 02:23 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.