TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

PHP, Perl, Haskell?

2 pointsby netbyteabout 13 years ago
I want to do simple scripts and be able to make simple blogs and stuff. Which language should I learn next?

6 comments

Lazareabout 13 years ago
PHP is a bad language; it is ubiquitous due to historical accidents and path dependencies. If you have the freedom to pick any language you want, and you don't have some specific urge to write Wordpress plugins or something, then <i>DO NOT PICK THIS</i>. (Also, PHP is likely as popular as it will ever be. There's not really any room for further growth.)<p>Perl is similar to PHP. It's not nearly as bad - in fact it's a great language in many ways - but it's also old. It's about as widely adopted as it's ever going to be, and it doesn't pick up new features as quickly as it once did. The syntax is also a bit quirky. :) Unless you want to work on Perl codebases, I'd recommend staying away, not because it's <i>bad</i> but because it's not really good enough.<p>Haskell isn't really suitable for scripts or simple webapps (your listed use cases). It's a wonderful language, and knowing it will make you a better programmer and a better person...but it doesn't do what you want. Stay away. :)<p>Better choices for you would be:<p>Python/Ruby: Flip a coin and pick one. Both are awesome, but they also have a lot of overlap; you won't regret either choice. They're both excellent for writing short scripts, webapps, etc. They are objectively MUCH better languages for these purposes than PHP, and at least marginally better than Perl. They also have very serious market share (which makes it easy to find tutorials, help, example code, open source projects to contribute to, etc.)<p>Javascript: With the advent of Node, it's a decent choice for what you want. And it's still the omnipresent language for client-side programming. Not as mainstream as Python/Ruby, but still pretty popular and widely adopted - but it's not completely mature, and new and interesting ideas are still popping up.<p>Something else: If those options don't spark any interest - or if you already know them - you might look farther afield. Lua and Clojure are both interesting options, in very different ways. As someone who already knows Python and JS pretty well, Clojure would probably be top of my list of "languages to learn". (I just wish it wasn't JVM based...oh well.)
评论 #3841127 未加载
adrusiabout 13 years ago
Well not PHP, that's for certain. A much as people bash on perl, it's actually quite useful for shell scripts that need a bit more power, so if you write a lot of shell scripts, I would recommend that. Although be warned, it isn't just a programming language, it's a way of life and while it's fairly easy to start with it, it's not as easy to get to the point where perl becomes really valuable, there are a lot of things to memorize.<p>Haskell is a different beast entirely. It is great for writing big applications because they will be very efficient, and have a sound code base that is easily understandable and extensible. It's also great for smaller things and can be a lot of fun to write. It's also makes you stand out from the crowd and look smarter; there's a certain respect for haskellers, whether it's justified or not.<p>Of course, haskell isn't that easy to learn. For those with no experience programming, it's no more difficult than learning with some other language, but if you know other languages, you will need to unlearn a lot, which is hard.<p>I would recommend haskell if you want to take on a big project or want to learn a lot along the way that you can carry over to other languages.<p>But I would definitely recommend one of python, ruby or javascript for the kinds of things you said you wanted to do.<p>I said no PHP because the only thing going for PHP is it's good documentation. PHP is bad in terms of language design, there are a lot of inconsistencies which get confusing. It's standard library is a mess, and a lot of PHP programmers are just pro copy-pasters.<p>Ruby, Python and javascript fill a similar niche as PHP and are all relatively easy to learn, easy to use and have nice communities. If you want to lean more on the scripting side, I would recommend ruby, if you want to do more of web programming, javascript, and if you want to do some other programming, python.
评论 #3841128 未加载
Rustabout 13 years ago
PHP is easy to learn and the documentation is extensive. But it is very easy to do things wrong in PHP, mostly because people learning PHP do a lot of copy/paste coding without really understanding the domain they're coding for (in this case, a web browser over the internet).<p>There are a lot of sites that give information on working with PHP correctly (including <a href="http://appwithphp.com/" rel="nofollow">http://appwithphp.com/</a> and <a href="http://planet-php.net/" rel="nofollow">http://planet-php.net/</a>), but expect to do a lot of reading and experimenting before getting it right.<p>I personally didn't care much for Perl as a web language, although it's great for system-level scripting.<p>I'd add Python to your list of potential languages too. I've been having a lot of fun with it lately :)
geoffsandersabout 13 years ago
Don't listen to any of the PHP haters here. You said you want to build <i>simple</i> scripts and blogs - something PHP is far more than adequate for, and it will be something you can pick up quicker than Python or Ruby. Also popular blog software like WordPress is all PHP.<p>While the PHP haters may be right if you're trying to get the best software engineering gig in Silicon Valley, for your purposes, I think PHP would probably be the best combination of tons of tutorials and documentation online, power and capability, and low learning curve.<p>Just my $0.02 as a PHP, Ruby, and JavaScript developer.
debacleabout 13 years ago
Which languages do you now know?<p>I would not recommend Haskell as it is a heavy lifting language, not really a scripting language. Perl is probably the strongest scripting language out there, and PHP is certainly the most ubiquitous web language out there. I learned Perl first, which made learning PHP super easy (you just have to unlearn a few things).<p>You can write scripts in both Perl and PHP, but web programming is definitely much easier in PHP. Try out both and see which one you like.
TheSmokeabout 13 years ago
if i had known that there were programming languages like python or ruby in 2005 i'd learn one of them instead of php.<p>haskell is another giant but i suggest going with either python or ruby. your taste will decide it.