Live data from Hacker News

Why Did I Choose Perl When Building Crowdtilt?

dsog.info

51–60 of 143 posts

Re: Why Did I Choose Perl When Building Crowdtilt?

#52
post #38

I see these justifications for perl almost every time it comes up - The community, cpan, writing lots of code fast. These are good things, but it's worth pointing out that EVERY OTHER LANGUAGE DOES THAT. Ruby has gem, python has pip - modern languages have these things built in by design. Not to hate on perl, because there's things I like about it, but this article could be retitled "what I like about not using fortr…

>> EVERY OTHER LANGUAGE DOES THAT

Do you really know about this?

I've done a bit of Python lately. The infrastructure isn't close (see e.g. Perl Testers, chromatic had a blog post about it quite recently). Also, CPAN is much richer than pypi.

Re: Why Did I Choose Perl When Building Crowdtilt?

#53
post #42

Earlier quoted context omitted.

Regardless of the structure of modern usage its syntax is still very noisy for the reader. It seems the majority prefer the cleaner syntax that doesn't use punctuation to define the type of access a la BASIC.

Yes, the sigils can make Perl code look noisy, especially as Perl uses curly braces and semicolons too. However, they do have a couple of nice benefits: firstly, they make variable interpolation easier (and less noisy!) than in other languages like Ruby and Python. Secondly, sigils make it easy to see what kind of data you are dealing with, obviating the need to scroll through your program to the variable declaration…

The sigils make variable interpolation easier only in the most generic case "interpolate $me". Anything more sophisticated requires a temporary variable.

Re: Why Did I Choose Perl When Building Crowdtilt?

#54

"As far as I know, Perl is one of the only languages that can evolve via 3rd party modules." Ummm... What?! There's a long tradition creating DSLs in the Ruby community. Lisp/Scheme/Clojure have macros. OCaml has campl4. I'm sure there are many others.

I'll give you macros, but if you define DSLs as "chained methods", many languages have DSL supports. The author's talking about Perl's support for mangling the language itself through third party modules.

Exactly. MooseX::Declare is a good example.

Re: Why Did I Choose Perl When Building Crowdtilt?

#55

Earlier quoted context omitted.

Isn't the maintainability of the code a function of who wrote it?

That is one aspect, but not the only one. When you start to write complex software you realize that the language, frameworks, libraries, design patterns, etc impact the maintainability of your code.

frameworks, libraries,

This is basically what Modern Perl and CPAN modules are all about. Checkout Perl Dancer as a web framework for example and you'll see simplicity.

Re: Why Did I Choose Perl When Building Crowdtilt?

#56
post #43

Earlier quoted context omitted.

"There are only two kinds of languages: the ones people complain about and the ones nobody uses" - Bjarne Stroustrup

He was very biased; it counts for little.

There are only two kinds of people: the ones others complain about and the ones nobody cares about.

Re: Why Did I Choose Perl When Building Crowdtilt?

#57
post #40

Earlier quoted context omitted.

Those are both excellent examples. One modifies the core language syntax to allow for writing tests in a cleaner and easier way. The other one modifies the language to make writing OO code in a new way, one that will be familiar to Java developers. I don't know of very many languages that allow developers to modify the core language via 3rd party modules. That's why Perl will never die - it will simply evolve as the…

As has been alluded to in another comment: Which other languages that compare to perl have you actually looked at? Python has rich meta-programming. Ruby has (almost) single-handedly super-hyped and re-invented the idea of domain specific languages (DSLs). Lisp is of course all about this (as is Forth). Javascript builds on the ideas from Smalltalk and (especially) Self to allow you to crazy stuff with how objects wo…

So, you acknowledge that your experience with Perl is outdated, yet you're sticking to your guns.

Re: Why Did I Choose Perl When Building Crowdtilt?

#58
post #47
post #42

Earlier quoted context omitted.

Regardless of the structure of modern usage its syntax is still very noisy for the reader. It seems the majority prefer the cleaner syntax that doesn't use punctuation to define the type of access a la BASIC.

As a self-trained programmer who cut his chops on Perl, I find it a bit humorous that people complain about reading Perl, while every coding test at a job interview involves some five-way algorithm or other generally-arcane CS concept that CS people spend two years practicing and that the business will never use. Two forms of complexity, one valued much higher within the industry.

+1

It is so hard to know that @ means array and % means a hash (key/value pair) haha.

Re: Why Did I Choose Perl When Building Crowdtilt?

#60
Does anyone have a good handle on how good perl interpreters are, or whether there are perl "compilers" that do something fancy, i.e. turn it into bytecode?

What with all the fancy compiler/interpreter technology going into things like V8, Nitro, pypy, cpy, etc, would be interesting to see how perl is keeping up in terms of speed.

Post reply on HN