Hacker News new | ask | show | jobs
by maratd 5359 days ago
> No one can make an intelligent decision until they know what an intelligent decision is.

Yup.

> And everyone starts off at the beginning when they're picking up a new language (or want to start learning).

Yup. PHP is a terrible language to be your first. Its loose nature, which allows an expert to sculpt beautiful code, is a noose upon which to hang oneself as a novice. Before I started on PHP (more than a decade ago), I already knew BASIC, C, and Java. Contrary to popular opinion, PHP is not a starter language, even though it is very easy to start.

1 comments

Can't disagree with any of that (other than that I don't think PHP is necessarily conducive to creating truly beautiful code). I think it goes the other way too: starting off with PHP doesn't give you a good idea of what other programming languages are like, and you'll find many things you grow accustomed to (or rely on) turned upside-down.

Maybe it's like learning to break the rules before you even know what they are?

* although to counter that, you can do some crazy things with it if you know how to. I abstracted Drupal's path finding method (drupal_get_path) into a magic static class. It's probably got a performance hit but it's bloody nice to look at:

    Module::module_name('css', 'example.css');
    // vs.
    drupal_add_css(drupal_get_path('module, 'module_name').'/css/'.$file_name);