Hacker News new | ask | show | jobs
by restlessmike 5097 days ago
If you're a really good PHP developer and are considering using another language, you should ask yourself one question:

Why do I need to switch?

You've already gone through the pain of learning how to work around all of its warts, and you will lose a ton of productivity immediately after switching to a new language. This may seem trivial if you are just programming as a hobby (and fun, even, to learn something new) but if you are a professional programmer, the productivity loss can be a problem. If you are a freelancer billing at a good rate, can you charge the same thing to your new client knowing things will take you twice as long and be less optimal, with bugs happening in new surprising places?

Taking on a new language needs to happen for a better reason than "the language I'm an expert in is kind of ugly." Are there libraries that are only available in the new language? Is there a different server architecture that lets you write applications with several times the performance in certain important use cases? These are valid reasons. "Too many functions in the global namespace" is not, especially if you already have them all memorized.

2 comments

There's a bit of a false dichotomy there. You don't just have to immediately switch or not. It's worthwhile to learn new languages regularly, whether you use them professionally or not. Keep working in PHP and do a small project in something else. Easy transition if you keep going deeper into this new language, or easy to change your mind and go back to PHP.
There's a fantastic reason: Having fun. Programming should be fun. If you find the language you're working with being ugly and terribly designed, it's hard to believe you're having fun.