Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My experience was some 20-odd years ago, when I was trying to learn design patterns by implementing them in PHP. Specifically, I built the whole array of abstract and concrete factories and all that, until I realised that it can all be replaced by something like:

  $className = "MyClass";
  $classInstance = new $$className();


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: