Need advice about which tool to choose?Ask the StackShare community!

CoffeeScript

3.3K
1.2K
+ 1
1K
Perl

3.4K
928
+ 1
574
Add tool

CoffeeScript vs Perl: What are the differences?

What is CoffeeScript? Unfancy JavaScript. CoffeeScript is a little language that compiles into JavaScript. Underneath that awkward Java-esque patina, JavaScript has always had a gorgeous heart. CoffeeScript is an attempt to expose the good parts of JavaScript in a simple way.

What is Perl? Highly capable, feature-rich programming language with over 26 years of development. Perl is a general-purpose programming language originally developed for text manipulation and now used for a wide range of tasks including system administration, web development, network programming, GUI development, and more.

CoffeeScript and Perl can be primarily classified as "Languages" tools.

"Easy to read", "Faster to write" and "Syntactic sugar" are the key factors why developers consider CoffeeScript; whereas "Lots of libraries", "Open source" and "Text processing" are the primary reasons why Perl is favored.

CoffeeScript and Perl are both open source tools. It seems that CoffeeScript with 15.2K GitHub stars and 1.99K forks on GitHub has more adoption than Perl with 435 GitHub stars and 152 GitHub forks.

According to the StackShare community, CoffeeScript has a broader approval, being mentioned in 364 company stacks & 170 developers stacks; compared to Perl, which is listed in 133 company stacks and 64 developer stacks.

Advice on CoffeeScript and Perl
Needs advice
on
GolangGolangPerlPerl
and
RustRust

I intend to use a programming language which I'll use as AWS runtime and write a script that will comb through tons of files in a directory and its subdirectories and search for simple text regular expressions and process and write the matches in a file as output. I have heard that Perl is good for regex based search but I also want the performance to be good as it will have to go through tons of files for IO. In this post: https://filia-aleks.medium.com/aws-lambda-battle-2021-performance-comparison-for-all-languages-c1b441005fd1, I see that Rust works well as AWS Lambda runtime with very good performance. Which one should I choose as my AWS lambda runtime for this problem? Golang is also an option as it is fast as per the above link.

See more
Replies (1)
Recommends

I used to work in a Perl shop and must admit that the language is very simple for tasks like these, but as you mentioned it's not fast at execution time. I'm now a Go programmer professionally but I taught myself the language while in college purely out of interest and eventually found my way to the job, not the other way around. I've recently been learning a little rust because of how much that language comes up in conversations around Go. I find the concept of the borrow checker nice but I have to admit I feel lost like I am in most flavors of new fancy framework js. That's not to say Rust is really anything like js, but the learning appears the same to me as someone who's convinced they could learn just about any programming language if it was necessary (over time I've seen procedural, OOP, declarative and functional stuff but never programming logic outside of the prolog code I wrote in school).

Go isn't made for your specific task at hand but it's a very easy language to pick up and it has good directory traversal standard library code and good regex (even though with time perl's has been optimized to be faster and I think it's written in C++) but more than anything Go is "cloud native" programming in that an awful lot of new microservice tech stacks are centered around it, docker and kubernetes are written in it, and there's a thriving community whose focus is generally web-first and performance-oriented. This means for your use case there might already be a large cohort of gophers that have asked the stackoverflow questions for you

I personally would push you towards the NYT Profiler for Perl before I would towards Rest, but that's because I know you wouldn't waste any time being able to get to the task at hand and then make it go faster, and I expect all but a few rustaceans would be able to do so with the same speed.

Whatever you pick I wish you the very best of luck!

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of CoffeeScript
Pros of Perl
  • 199
    Easy to read
  • 179
    Faster to write
  • 126
    Syntactic sugar
  • 104
    Readable
  • 104
    Elegant
  • 73
    Pretty
  • 53
    Javascript the good parts
  • 48
    Open source
  • 44
    Classes
  • 35
    "it's just javascript"
  • 16
    Compact code
  • 15
    Easy
  • 13
    Simple
  • 13
    Not Javascript
  • 2
    Does the same with less code
  • 1
    I'm jobs I'm software engineer
  • 72
    Lots of libraries
  • 66
    Open source
  • 61
    Text processing
  • 54
    Powerful
  • 49
    Unix-style
  • 47
    Regex
  • 37
    Stable
  • 32
    Concise syntax
  • 29
    Hackerish
  • 22
    Easy to use
  • 15
    Swiss army chainsaw
  • 13
    Code Less Do More
  • 12
    CPAN
  • 9
    Freedom
  • 8
    All purpose
  • 5
    Many ways to do it
  • 5
    Familiar
  • 5
    Readability
  • 5
    Community
  • 4
    Modular
  • 4
    Smart (does alot for you)
  • 4
    Object-Oriented
  • 3
    Postmodern
  • 3
    It's the best one-off task language
  • 2
    For a man
  • 2
    Good man pages
  • 1
    Auto case variables
  • 1
    Single Source Library (CPAN)
  • 1
    Multi-threaded support
  • 1
    Hashes
  • 1
    C-style
  • 1
    Multiparadigm

Sign up to add or upvote prosMake informed product decisions

Cons of CoffeeScript
Cons of Perl
  • 3
    No ES6
  • 1
    Corner cases in syntax
  • 1
    Parentheses required in 0-ary function calls
  • 1
    Unclear what will be grouped to {…}
  • 4
    Messy $/@/% syntax
  • 3
    No exception handling
  • 2
    Bad OO support
  • 2
    "1;"
  • 2
    No OS threads
  • 1
    Variables are global by default
  • 1
    Copy-on-create for interpreter-based threads
  • 1
    Barewords
  • 1
    Errors/warnings are ignored by default

Sign up to add or upvote consMake informed product decisions

What is CoffeeScript?

It adds syntactic sugar inspired by Ruby, Python and Haskell in an effort to enhance JavaScript's brevity and readability. Specific additional features include list comprehension and de-structuring assignment.

What is Perl?

Perl is a general-purpose programming language originally developed for text manipulation and now used for a wide range of tasks including system administration, web development, network programming, GUI development, and more.

Need advice about which tool to choose?Ask the StackShare community!

What companies use CoffeeScript?
What companies use Perl?
See which teams inside your own company are using CoffeeScript or Perl.
Sign up for StackShare EnterpriseLearn More

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with CoffeeScript?
What tools integrate with Perl?

Sign up to get full access to all the tool integrationsMake informed product decisions

Blog Posts

What are some alternatives to CoffeeScript and Perl?
JavaScript
JavaScript is most known as the scripting language for Web pages, but used in many non-browser environments as well such as node.js or Apache CouchDB. It is a prototype-based, multi-paradigm scripting language that is dynamic,and supports object-oriented, imperative, and functional programming styles.
TypeScript
TypeScript is a language for application-scale JavaScript development. It's a typed superset of JavaScript that compiles to plain JavaScript.
ES6
Goals for ECMAScript 2015 include providing better support for large applications, library creation, and for use of ECMAScript as a compilation target for other languages. Some of its major enhancements include modules, class declarations, lexical block scoping, iterators and generators, promises for asynchronous programming, destructuring patterns, and proper tail calls.
Babel
Babel will turn your ES6+ code into ES5 friendly code, so you can start using it right now without waiting for browser support.
jQuery
jQuery is a cross-platform JavaScript library designed to simplify the client-side scripting of HTML.
See all alternatives