Report: Perl and CoffeeScript (Dom)
Contents
Perl
Perl is short for “Practical Extraction and Reporting Language”. Perl is a CGI (Common Gateway Interface) scripting language, due to its parsing ability. Perl is also used for graphics programming, system administration, network programming, finance, bioinformatics and other applications. Its nickname is “the Swiss Army chainsaw of scripting languages” because of its flexibility and power. The overall structure of Perl derives broadly from C. It is mainly based with variables, expressions, assignment statements, brace-delimited blocks, control structures and subroutines.
The Pros of Perl:
- Its an interpreted language, excellent for sed/AWK replacement, having more functionality and similar syntax
- Good at pattern matching, regular expressions and string manipulation
- Good for file manipulation
- Very portable, available for almost every platform
The Cons of Perl
- As scripting, it is slower for a lot of tasks
- Object oriented not implemented well
- Creates problems when the codes are larger than 200 line and argument handling is poor.
System Requirements:
- Available for nearly every computing platform
Languages Borrowed From:
- C
- Shell scripting(sh)
- AWK
- Sed
They provide powerful text processing facilities without arbitrary data-length limits of many contemporary Unix command line tools, facilitating easy manipulation of text files.
Perl seems to be very popular as it is used by top websites including Amazon, Zappos, IMDB, Ticketmaster, Craigslist and many more. Personally, I think that I would use Perl. It seems that it is a well-developed language that’s easy to understand and grasp. I enjoy languages that are easy to understand because it makes it more fun to learn. I like how it can be used on almost all platforms so there’s no hassle if you don’t have the operating system that it requires. From what I have read online the opinions of Perl are 50/50 but I certainty think I could see myself developing a mobile application with it.
(Back to top)CoffeeScript
CoffeeScript is a programming language that trans compiles to JavaScript. CoffeeScript is inspired by Ruby, Python and Haskell to enhance JavaScript’s readability and adding features such as list comprehension and pattern matching. CoffeeScript compiles to JavaScript and programs can be written with less code and have no effect on runtime performance. The compiler was written in Ruby with a self- hosting version in CoffeeScript.
The Pros of CoffeeScript:
- It encourages the use of good JavaScript patterns
- Discourages JavaScript anti-patterns
- Makes even good JavaScript code shorter and more readable.
The Cons of CoffeeScript:
- The syntax errors the CoffeeScript compiler throws are often vague
- There isn't a way to match compiled JavaScript’s lines to the original CoffeeScript
- It’s prone to change. Code may run differently or not at all under a future version of CoffeeScript
- Very sensitive to whitespace, counting a tab as a single space.
System Requirements:
- Windows
- Mac
Languages included:
- JavaScript
A general principle is that many unnecessary parentheses and braces can be dropped because indentation can be used instead of braces to denote blocks of code, function calls are implicit (the parentheses needed for a function call in JavaScript can be dropped), object literals are often detected automatically and so on. I think that also I would develop in CoffeeScript because reading reviews and going over information I found it is an easy to understand and creates less code with no effect on runtime. It’s mainly a new thing so people have their doubts about their technology changing, but also it has time to grow and get even better. There were mixed reviews about it saying that it’s not worth learning but it is actually not a language, its basically just JavaScript. I can still see my self-using it because of its easy syntax and understandable code base.
(Back to top)