Saturday 21 September 2013

Some notes on Programming Languages

So, You have just seen the Hello World program in C.

This is one of the most basic programs that can be written with any language. I maintain a github repository(Refer to my blog on Github and Git, VCS etc) that has this same "Hello, World!" Program in many other programming languages.

Hello World

So, This is something that can be done everywhere. And this is the reason why I don't believe that there is one programming language that is better than all others. This is so because there are a lot of programming languages. Write down from Assembly Language which is the closest to the machine to languages like Perl, Python that are now commonly termed as "Very-High Level Languages". Coding in these languages is extremely simple and intuitive. Moreover, they have a whole bunch of libraries. These libraries make sure that for any application that you may think there will be a library so you will not have to code that from the beginning. You can simply reuse the code. We will talk a lot more about reusing code throughout this series. It is a topic that is often closely related with Plagiarism of code itself.

C is considered to be a High Level Language.

The levels of programming languages refer to the level of abstraction. Or in layman terms, They simply refer to the "metaphorical" distance you are, from the internals of the machine. Coding in Assembly Level Languages(I don't prefer to call them low level languages simply because you don't call something that is hard "Low Level"!) has some issues:


  1. Code starts to get machine dependent. It starts getting dependent on the specifications of the machine you are coding on.
  2. You need to remember a lot and that makes coding a lot harder than it really should be.

High Level languages overcome the first problem by creating cross-platform compilers. You take a C program and compile it on a Mac, Linux, Windows, Solaris machine using a GCC compiler on all the machines and you will always get the same output.

The second problem is solved to some extent. You do need to remember somethings, But they are fairly simple to remember. As we move on through the series about C we will see that we need to remember some basic rules. Some keywords et al.

This process of remembering is also automated in many IDE's today. IDE's generally have the whole bunch of keywords and functions that are there in a language stored in them so that whenever we want something we can pull it from there without having to Google it or refer to Textbooks.

So in this blog we saw some points on high-level languages, problems with coding in assembly languages, equality of programming languages. We will be seeing a lot more philosophy but for now lets get back to coding.

No comments:

Post a Comment