StudentShare
Contact Us
Sign In / Sign Up for FREE
Search
Go to advanced search...
Free

A Comparison of Programming Languages - Coursework Example

Cite this document
Summary
"A Comparison of Programming Languages" paper compares three scripting languages. These are various scripting languages which include Hypertext Pre-processor (PHP), Java Server Pages (JSP), Ruby on Rails, Python among others. All of the three chosen scripting languages are object-oriented. …
Download full paper File format: .doc, available for editing
GRAB THE BEST PAPER94.2% of users find it useful
A Comparison of Programming Languages
Read Text Preview

Extract of sample "A Comparison of Programming Languages"

Sunday, 11 September A Comparison of Programming Languages Introduction The recent evolvement of the internet has seen creation of millions of websites aimed at performing different tasks. These tasks are powered by several programming languages. This has led to the popularity of scripting languages. The proliferation of the internet is the main key to the emergence of the scripting programming languages, specifically designed for data and string processing, and for CGI scripts. The scripting languages are preferred over other programming languages since they are powerful, simple and can easily be used. There are various scripting languages which include Hypertext Pre-processor (PhP), Java Server Pages (JSP), ruby on Rails, Python among others. This paper will compare between three scripting languages (PhP, python and ruby on rails). All of the three chosen scripting languages are object oriented. Despite the fact that python is an object oriented programming language, it started out as procedural language which then incorporated object oriented features. PhP and ruby are purely object oriented programming languages. Semantics and syntax comparisons PhP allows code embedment into the content document. This is useful in small websites since it is easier to implement, but when it comes to larger websites, embedding the code into the content documents is not recommended, but instead, the use of template engines is encouraged. The separation of the code is vital since it facilitates improved clarity and eases maintenance of the application created by the programming language. A basic example of PhP script extracted from PhP Manual is as shown in the code snippet below (The Php Group, 2014) PHP Test The above example shows a typical syntax of PhP code embedded in HTML. Another example of typical PhP code snippet for returning curl output as a string is shown below. The code is extracted from the php Manual (The Php Group, 2014) The creation of the PhP syntax was based on C syntax. This has made functions to be the main elements in PhP. The functions in PhP must have unique names and variables must start with $ sign. There is no initialization of variables in PhP and access to global variables can be achieved using the special keyword “global” (Vaswani, 2005). Initially, python was not meant to be used as a scripting language. The introduction of python as a scripting language utilized CGI approach. In this approach, writing of web frameworks was done in python but there execution was based on the employments of different external techniques which involved mod_python and CGI to facilitate communication between the gateways of the webserver. This resulted in incompatibility of the applications on different web servers. The solution to this problem was by the introduction of the WSGI (Hetland, 2010). The introduction of the WSGI is beneficial due to the fact that it has led to introduction of unified interface. Despite this, the WSGI is complicated making it harder to learn python as compared to easiness in learning Php and Ruby. Also, there is explicit definition of the details as compared to implicit definitions as in PhP. The syntax of Python is the easiest to read and it is easily understandable since it only employ few keys words. The major difference between Python, PhP and Ruby is the strictness in the indentation. In python, indentation is mandatory while in Ruby and PhP, indentation is optional. In python, end of a line need not to end with a semi colon, though it is accepted. This is different in PhP and Ruby whereby the end of a statements must be indented (Hetland, 2010). Ruby scripting programming language is supported by a single web frame work, ruby on rails frame work. The ruby on rails frame work utilizes CGi getaways and in some instances, it provides a web server that is only used for development purposes. The syntax of ruby is almost similar to the syntax of python, though the semantics are completely different. The design of Ruby was purely focused on making the language object oriented (Ford, 2007). The separation of statements in Ruby can be done by moving on new lines, but also, semi colons can be used – this is similar to python. Indentation is not mandatory in Ruby as with the case in python. Instead, Ruby employs the use of keywords such as “end” and “do” in indication of blocks. Just like python, procedural programming paradigm is also supported in ruby (Ford, 2007). Comparison basing on usability and readability Comparing the three scripting languages, it can be seen that the documentation of php is extensive and any user familiar with C programming is comfortable with using Php scripting language (Hetland, 2010). On the other hand, python strict enforcement of indentation and use of the few keywords makes beginners to easily learn the language. Ruby is thought to be only used by experienced programmers who require a powerful scripting language and elegance. Comparing the readability of the three languages, python is considered to have the most readable syntax as compared to both Ruby and Php. Php comes in second since the Php syntax is similar to C syntax which is familiar to most users. Comparison basing on the easiness to use the programming languages. In terms of comprehension, python is the considered to be the easiest scripting language to comprehend by beginners. It allows the beginner to grow from doing simple programming to complex programming while at the same time preserving its ease of comprehension. The easiness to comprehend python is based on the fact that it uses natural language in its syntax. The comprehension of python cannot be compared to languages such as php and Ruby which are considered to be difficult by newbies (Hetland, 2010). Comparison of the languages basing on the languages’ features. There are various features equipped with the three programming languages which are of extreme importance in web developments programming. The first feature to be considered among the three programming language is the exception handling. The current Php 5 supports exception handling just like python and ruby which supports the exception handling. The difference in supporting this feature only arises in the syntax but the functionality remains the same. All the three scripting languages support relational database abstraction. Moreover, Ruby and Python are high level programming language with a Capers Jones language level of at least 15. The two languages, Python and Ruby, promote test driven development and support full Unicode. The only difference in this support arises in the syntax of the different programming language in implementing this feature, though the functionality remains the same across the three languages. In terms of supporting multithreading, ruby and python have been designed to support multithreading functionality. In python, there is the Global interpreter lock while in Ruby, there is the Global VM lock. Another feature comparison among the three languages is the interactive development with the interpreter. Both the three languages – Python, Ruby and Php has functionality to support interactive development with the interpreter. Finally, there is the comparison of the programming languages basing on the functional programming. Ruby, Python and Php Support functional programming. Though, Ruby is considered to be better designed to support functional programming style as compared to python and php. In conclusion, each of the three programming languages – Php, python and Ruby – is suited with different features to facilitate performing of different tasks. The basic functionality of the each of the programming languages is based on object oriented programming. With the programming languages, attainments of a certain task can be achieved by any of the three scripting languages though with different complexity index. References Ford, J. L. (2007). Ruby Programming for the Absolute Beginner. Boston: Course Technology PTR. Hetland, M. L. (2010). ython Algorithms: Mastering Basic Algorithms in the Python Language. New York: Apress. The Php Group. (2014). Php Examples. Retrieved April 7, 2014 The Php Group. (2014). Your first PHP-enabled page. Retrieved April 7, 2014 Vaswani, V. (2005). How to Do Everything with PHP & MySQL. McGraw Hill Professional. Read More
Cite this document
  • APA
  • MLA
  • CHICAGO
(A Comparison of Programming Languages Coursework Example | Topics and Well Written Essays - 1250 words, n.d.)
A Comparison of Programming Languages Coursework Example | Topics and Well Written Essays - 1250 words. https://studentshare.org/logic-programming/1819263-a-comparison-of-programming-languages
(A Comparison of Programming Languages Coursework Example | Topics and Well Written Essays - 1250 Words)
A Comparison of Programming Languages Coursework Example | Topics and Well Written Essays - 1250 Words. https://studentshare.org/logic-programming/1819263-a-comparison-of-programming-languages.
“A Comparison of Programming Languages Coursework Example | Topics and Well Written Essays - 1250 Words”. https://studentshare.org/logic-programming/1819263-a-comparison-of-programming-languages.
  • Cited: 0 times

CHECK THESE SAMPLES OF A Comparison of Programming Languages

Differences in Design Objectives

(Deitel & Deitel, 2009) comparison of Features Java and C++ differ significantly when it comes to certain features and implementation in each language.... Java is a statically typed OOP like C++ and both languages display a similar syntax though their syntaxes are not compatible with each other.... C++ is an extension of C and was aimed for systems and application programming.... hellip; It provided added support for statically typed OOP (Object Oriented programming), handling exceptions, generic programming and scoped resource management....
5 Pages (1250 words) Research Paper

Computer Science and Information Technology: Numerical Precision

The figure below shows a comparison of memory performance of the GPU and CPU.... Numerical Precision Institution Numerical precision.... Floating-point arithmetic is reflected as an obscure issue by a lot of persons because it is universal in a computer scheme.... Every language almost has a floating-point data type, meaning computers that consist from PCs to supercomputers of floating-point accelerators, compilers would oftenly be needed to compile floating-point procedures and then almost every operating system should answer to floating-point exclusions like excess....
5 Pages (1250 words) Research Paper

Important Parts of the .net Platform

The programmer can use Visual Basic, Jscript, and C # to write codes and the CLR manages the code written in these different languages at execution time.... ET compatible high level languages, it does not get directly converted into the executable binary code but has to pass through an intermediate conversion state called MSIL or IL.... Also that this IL makes the comparison and inter operability between codes of different high level languages possible as all the ....
2 Pages (500 words) Essay

Comparison between Application and System Software

Generally, there are three (3) main categories of the software include: the application software, system software and computer programming software (tool).... On the other hand, the computer programming tools are utilized The computer programming tools include, but are not limited to the debuggers, linkers, compilers, Microsoft software development tools and Java development tools.... The document focuses only the system and application software and provides their detailed comparison....
3 Pages (750 words) Essay

IOS Development Using Watchkit

All a person needs is an account charged $99 annually, a mac computer, Xcode platform and a coding experience, such as the Swift and Objective-C coding languages.... created a modern programming language called swift.... The flexibility of Swift is attributed to its capacity to support widespread late binding, dynamic dispatch and extensible programming.... nbsp;The Swift programming language has several features that indicate some similarities to the Objective-C, though are easier and more flexible....
7 Pages (1750 words) Essay

How does a Computer Program Work

The researcher of the following paper claims that Personal Computers (PCs) trace their history back to the 1970s when Ed Roberts began to sell computer kits that were based on a microprocessor chip.... These were designed by Intel and so Intel is undoubtedly the flag bearer of the PCs that we see today....
5 Pages (1250 words) Research Paper

How to Detect Plagiarism of a Person

From the paper "How to Detect Plagiarism of a Person" it is clear that high-level programming language is more close to spoken language, it is more structured and hides the underlying details of how the communication takes between the user and machine.... hellip; Analogue quantities can take between any values between two given points....
8 Pages (2000 words) Assignment

A Methodology for the Development of a Visual Programming Language

This term paper "A Methodology for the Development of a Visual programming Language" presents LabView as the short form for Laboratory Virtual Instrumentation Engineering Workbench, a methodology for the development of a Visual programming language and was developed by the National Instruments....
5 Pages (1250 words) Term Paper
sponsored ads
We use cookies to create the best experience for you. Keep on browsing if you are OK with that, or find out how to manage cookies.
Contact Us