Live data from Hacker News

Why Did I Choose Perl When Building Crowdtilt?

dsog.info

61–70 of 143 posts

Re: Why Did I Choose Perl When Building Crowdtilt?

#61
post #15
post #2

How do you find hiring? A Blekko founder said they chose Perl partly because as one of the few hot startups to be using Perl, it would make them a top choice for great Perl hackers.

I've heard this argument before: I'll build my product using X because nobody else is doing it, so all the best Xers are going to line up. I can't speak for the author, but I haven't seen it quite work out. Unless you're talking exclusively to language/stack zealots, the best guys are evolving the tools, and the next-best are evolving with them. That's not to say that all things old are bad and all things new are goo…

In all fairness, I think it depends on what "X" is in your case. If you've decided on Prolog as your language of choice, you are going to be limited to a pool of government type candidates and IBM event management gurus.

Perl was one of the first mainstream advanced scripting languages to run the Web, so the amount of folks out there that cut their teeth on CGI/Perl is pretty wide and deep.

For me, I started writing my first Web apps in Perl, and moved over to PHP.

Re: Why Did I Choose Perl When Building Crowdtilt?

#63

"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.

What does Perl have in that regard that Ruby hasn't? Ruby also has open classes and you can chain and modify any of the base classes, be it "String" or "Object".

I don't know anything like "MooseX", but that might be because Ruby actually has a somewhat working object system.

Re: Why Did I Choose Perl When Building Crowdtilt?

#64
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…

Java doesn't have any of them.

Re: Why Did I Choose Perl When Building Crowdtilt?

#65
post #42

Earlier quoted context omitted.

I agree. It is a misconception that Perl is "dying". It powers a lot of the web. It had a bad rep a few years ago due to cryptic-looking codes that were written as a throw away code and somehow spread all over the web :). I was one of the skeptical developers at some point, but then I got hooked :). Modern Perl changes the old rep alltogether. I encourage people to write well architected, maintainable, extensible cod…

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.

Who cares about the syntax? The real problem is the weak typing.

Re: Why Did I Choose Perl When Building Crowdtilt?

#66
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…

I've not touched Perl aside from modifying and using basic scripts for process automation and administration tasks.

But since you called-out Python and Ruby, I'm curious what you meant.

In Python, for example, interpolation would look like:

print "I ate a %s for %s" % ('banana', 'lunch)

(or the newer way with nominally more keystrokes)

print "I ate a {0} for {1}".format('banana', 'lunch')

I've done plenty of PHP work and I get that I can do "{$varhere}" but for strings of any length or complexity it was totally common to use sprintf() an I have to assume the same readability principles apply in Perl?

Re: Why Did I Choose Perl When Building Crowdtilt?

#67
post #63

Earlier quoted context omitted.

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.

What does Perl have in that regard that Ruby hasn't? Ruby also has open classes and you can chain and modify any of the base classes, be it "String" or "Object". I don't know anything like "MooseX", but that might be because Ruby actually has a somewhat working object system.

Perl lets you add new language keywords which take effect during the parse phase.

Re: Why Did I Choose Perl When Building Crowdtilt?

#68

Earlier quoted context omitted.

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…

I've not touched Perl aside from modifying and using basic scripts for process automation and administration tasks. But since you called-out Python and Ruby, I'm curious what you meant. In Python, for example, interpolation would look like: print "I ate a %s for %s" % ('banana', 'lunch) (or the newer way with nominally more keystrokes) print "I ate a {0} for {1}".format('banana', 'lunch') I've done plenty of PHP work…

In Perl you could write

print "I ate a $fruit for $meal"

Or

printf 'I ate a %s for %s', $fruit, $meal

Re: Why Did I Choose Perl When Building Crowdtilt?

#70
I hope the strong testing culture and rock-solid reliability are another good sticking point.

CPAN is more than just a repository of modules: it's a tool-chain of software. When you upload a module you get a tonne of feedback about which platforms and versions of Perl the tests fail on, you get reports from CPAN Testers about your library in the wild, and when new Perls come out you get notifications if your library gets broken.

The ability for the language to evolve, I think, has been a big reason why Perl is still around. It's able to adopt new features and simultaneously remain backwards compatible for long periods of time (for the most part).

I don't use perl most of the time, but when I do I like it.

Post reply on HN