Hacker News new | ask | show | jobs
by kailuowang 4688 days ago
The code example he gave in ruby and PHP demonstrate perfectly that the PHP version is verbose (not to mention that the ruby code isn't the most concise one). It could be just me, who, as a develop, is sensitive to every single unnecessary characters in the code, which happens a lot in that couple lines of php code.
1 comments

That example is framework specific. Change the php framework to laravel and this:

    $topic = $this->get('model.Topic')->find($topic_id);
    $this->get('guardian')->ensureVisible($topic);
becomes this:

    $topic = Topic::find($topicId);
    Guardian::ensureVisible($topic);