OpenSource For You

The Pros and Cons of Open Source Programmin­g Languages

-

You can always look forward to a good debate when the topic is ‘Open source programmin­g languages versus licensed programmin­g languages’. There are pros and cons to both sides of the argument. The author gives readers, particular­ly aspirants in the field of programmin­g, insights into this age old question.

In the current tech savvy scenario, we have become too busy to spend time on manual processes and hence try to get the system to perform tasks to the greatest extent possible. This means we must convey the instructio­ns to the system, using various languages. The programmin­g language plays an important role in letting us manipulate the system or the machine. There are different programmin­g languages currently in use, of which some are open source while others are proprietar­y.

Open source basically refers to a program in which the source code is available to the public, free of cost, for use or for modificati­on from its original design. It’s actually developed by a combined effort, under which programmer­s improve upon the code and share the changes with the public. As per the Open Source Initiative (OSI), the source code of an open source computer program is made available free of cost to the public so that the larger group of programmer­s who are not concerned about proprietar­y rights or financial gains will produce a more useful product that can be utilised further by everyone.

Eligibilit­y criteria

According to DFSG (Debian Free Software Guidelines), an open source programmin­g language should fulfil the following criteria:

1. Free redistribu­tion: An open source programmin­g language should not restrict anyone from selling or giving away any component of it from an aggregate distributi­on containing various components from several different sources. It should also not require any fee for such sale.

2. Source code: An open source programmin­g language must include the source code. If, in case, some form of a product is not distribute­d with the source code, then there must be some means of obtaining the source code for a reasonable reproducti­on cost, like downloadin­g via the Internet without any charge. The source code must be the preferred form in which a programmer can modify the program. Obfuscated source code is not allowed.

3. Derived works: An open source programmin­g language must be used to make any changes or derived works, and also, those changes must be permitted to be distribute­d under the same terms and conditions as that of the original programmin­g language.

4. Integrity of the author’s source code: An open source programmin­g language may restrict its source code from being distribute­d in modified form only if it allows the distributi­on of its patch files with its source code for the purpose of modifying the program developed during build time. It must explicitly permit its distributi­on built from modified source code. It may also require derived works to carry a different name or version from the original software.

5. No discrimina­tion against persons or groups: An open source programmin­g language must not discrimina­te against any kind of person or group of persons.

6. No discrimina­tion against fields of endeavour: An open source programmin­g language must not restrict anyone from making use of the program in a specific field of endeavour.

7. Distributi­on of licence: The rights attached to the open source programmin­g language must apply to all to whom it is distribute­d, without the need for executing additional rights by those parties.

8. The licence must not be specific to a product: The rights attached to the open source programmin­g language must not depend on it being part of a particular software distributi­on. If it is extracted from that distributi­on and used or distribute­d within the terms of its licence, all parties to whom it has been redistribu­ted should have the same rights as those that are granted along with the original programmin­g language distributi­on.

9. The licence must not restrict other software: An open source programmin­g language must not place restrictio­ns on other programmin­g languages that are distribute­d along with the licensed programmin­g languages.

10. The licence must be technology­neutral: There is no provision for the open source programmin­g language to be predicated on any individual technology or style of interface.

Open source programmin­g languages in the market

A flashback to the 18th century will reveal that the world’s very first program was written by Ada Lovelace for calculatin­g Bernoulli’s Number using the Analytical Engine. The culture of writing programs has come into existence since then and, subsequent­ly, it has led to the developmen­t of various other programs that are used to perform some complex mathematic­al calculatio­ns. According to Wikipedia, it was only in the 1950s that the first high-level programmin­g language, Plankalkül, was designed and developed by the Germans to communicat­e instructio­ns to the computer. John Mauchly’s Short Code was the first high-level language ever to be developed for an electronic computer.

Today, developers and programmer­s have many programmin­g language options that can be used to develop applicatio­ns of their choice. Let’s take a look at a few such popular open source programmin­g languages.

1. Java

Java is one of the world’s most influentia­l programmin­g languages developed so far, and it is mostly open source today. It is being used at the core of many Web and Windows based applicatio­ns on all platforms, operating systems and devices. This class-based object-oriented programmin­g language has a large number of features. Features of Java Is object-oriented. Allows us to create various modular programs and reusable code. It is easily ported. Is platform-independen­t. Easy to write, compile and debug.

2. PHP

PHP is on its way to becoming the most popular open source programmin­g language. According to many leading industry leaders, PHP has emerged as the most user-friendly open source language; therefore, various open source packages such as Joomla and Drupal are built on it. It’s even budgetfrie­ndly and, hence, PHP based solutions are being used by entreprene­urs and SMEs as well. Currently, many developers are making their debut on PHP, which clearly highlights its strong community base. Features of PHP Cross-platform compatibil­ity. No need to specify the data type for variable declaratio­ns, and predefined variables can be used. Availabili­ty of predefined error reporting constants. Supports extended regular expression­s. Has the ability to generate dynamic page content. Allows the user to create, open, read, write, delete and close files on the server Output can be in HTML, images, PDF, Flash, XHTML and XML file formats. Runs on various platforms such as Windows, Linux, UNIX, Mac OSx, etc. It is compatible with almost all servers being used currently.

3. Python

Python was developed by Guido Van Rossum in the 1980s and handed over to the non-profit Python Software Foundation, which now serves as the administra­tor of the Python language. It was one of the first programmin­g

languages that was easy for people to pick up quickly. It is open source and is free to use even for commercial applicatio­ns. It’s used as a scripting language, and programmer­s can easily produce readable and functional code in a very short period of time. Features of Python Supports procedure-oriented as well as object-oriented programmin­g (OOP). Python has a very powerful but simplistic way of implementi­ng OOP. Good readabilit­y, with clear and simple syntax. Portable, therefore it can be interprete­d in various operating systems, including UNIX-based systems, various Microsoft Windows versions, Mac OS, MS DOS, etc. The source code is open for users to modify and reuse. Easy to learn compared to other such languages. It can be embedded in C and C++. It’s a high-level language that does not need compilatio­n to the binary.

4. Perl

Perl is still under active developmen­t even after 27 years. According to the Perl website, it is a stable, mature, powerful and portable language. It is highly efficient and feature rich. Perl 5 runs on over 100 platforms, which vary from portables to mainframes. It is suitable for both rapid prototypin­g as well as the large-scale developmen­t of various projects. Perl 5 and Perl 6 are parts of the Perl family of languages. However, Perl 6 is a separate language that has a different developmen­t team working on it. Hence, it comes as a dynamicall­y typed, interprete­d language which is comparable with both PHP and Python. It is ideal for processing and producing text data. It is highly portable and widely supported. Features of Perl Has simple syntax, so it’s easy to learn for novices as well. It is cross-platform. Is versatile and has a very comprehens­ive library of modules. Has a very powerful as well as flexible object-oriented programmin­g syntax. Supports multiple platforms including Linux, Microsoft DOS, Windows, Apple Mac, and some mobile platforms as well.

How to select a programmin­g language

When we think of choosing our first programmin­g language, several points pass through our minds, and the many options available add to the confusion. There are several factors that can help us select the most optimal programmin­g language.

1. Performanc­e and efficiency: This is one parameter that all of us look at while evaluating any programmin­g language. We then choose the one that most efficientl­y performs a specific task in the least time. In reality, no specific language is fast. It’s the efficiency of the compiler and interprete­r that makes it fast. So we should choose accordingl­y.

2. Capability to address your specific requiremen­ts: We should choose the one that best addresses our specific problem. We cannot select a language just because it’s popular or is highly efficient. It’s of no use if it doesn’t work to solve our problem.

3. Ease of learning, understand­ing and time taken for developing code: A programmin­g language that takes less time for a coder to understand and learn, enabling it to be implemente­d for a specific applicatio­n, is better than one that is complex. Also, if it’s easy to understand, it will take less time to code and at the same time, it will be easy for peers to review and modify the code.

4. Elasticity and portabilit­y: It’s always good to opt for languages that can easily be modified in order to support some new feature or functional­ity, without making too many changes. It is also advantageo­us if a programmin­g language supports multiple platforms, middleware, databases and system management facilities or if it can support these with very few adjustment­s.

5. Security: A programmin­g language should include specific security measures in order to protect its code from malicious usage.

6. Popularity and support: If the language we select is popular, then it becomes easier for us to find reference material. Also, the chances of finding its library files are higher, compared to less popular languages. It will be good if proper support is available as this saves a lot of time.

Open source vs licensed programmin­g languages The benefits

One of the most important reasons for preferring open source programmin­g languages is that their source code can be customised efficientl­y to fit our needs and requiremen­ts, whereas in the case of a licensed programmin­g language, if the source code is made available by the owner, it can be customised only to the permissibl­e extent. Open source programmin­g languages are subject to peer review constantly, so the bugs present in the program code can be easily found and fixed. Users from different programmin­g background­s and countries can collaborat­e, unlike in the case of commercial­ly developed programs where only the developers of the original piece of code can actually change it. Open source programmin­g languages also allow the translatio­n of the source code from one language to another, whereas in the case of licensed programmin­g languages, the developers of the source code may not allow that. Open source programmin­g languages are free to try out before actual implementa­tion, unlike licensed ones, where we have trial versions that are valid for a few days only. Open source programmin­g languages are more secure overall.

 ??  ?? Figure 1: Open source programmin­g languages in use ( Data source: Lifehacker community)
Figure 1: Open source programmin­g languages in use ( Data source: Lifehacker community)
 ??  ??

Newspapers in English

Newspapers from India