Live data from Hacker News

Addition of 1 and 1 in PHP

github.com

81–89 of 89 posts

Re: Addition of 1 and 1 in PHP

#81
post #20

This is so funny. The author's description is great on github, really fooling you at times. Even if this isn't intended as a joke, the dedication to doing something fun to prove a point got me thinking about over engineering design patterns too.

>"got me thinking about over engineering design patterns too." Relevant: http://me.veekun.com/blog/2013/03/03/the-controller-pattern-... (by the same dude who wrote "PHP: A Fractal of Bad Design", no less)

I'm going to check whether I still have vodka somewhere around my place, because I want to forget some code real fast.

Re: Addition of 1 and 1 in PHP

#82
post #71

Pretty much sums up how I feel about most of the big frameworks (Zend in particular, but also Symfony and CakePHP). The problem of over-engineering isn't just related to the big PHP frameworks - the same problem exists in Python and Ruby. At its core, web development is about taking some user input, validating it, throwing it in a database, and displaying it again (perhaps slightly modified) to users. That's a fairly…

Frameworks are also very useful. They can provide a tested database layer that prevents SQL injection, form data validation and escaping, straight-forward MVC structure, and a library of common functions that are well tested and help developers avoid common mistakes. Ideally, a framework would have some basic elements and then additional components that can be included if required by a project but aren't core to the…

Sure - but if you compare, say, Zend with Laravel, you'll see that the former is hugely complex compared to the latter - and what I'm saying is that the complexity doesn't seem to make the code more maintainable later on - possibly quite the opposite.

Re: Addition of 1 and 1 in PHP

#83
post #79

Pretty much sums up how I feel about most of the big frameworks (Zend in particular, but also Symfony and CakePHP). The problem of over-engineering isn't just related to the big PHP frameworks - the same problem exists in Python and Ruby. At its core, web development is about taking some user input, validating it, throwing it in a database, and displaying it again (perhaps slightly modified) to users. That's a fairly…

You know, planes are a very simple concept: something that flies. Aerospace engineering should reflect that.

CRUD apps are inherently simpler than airplanes, and unlike airplanes no one dies when your CRUD app crashes.

Re: Addition of 1 and 1 in PHP

#84
post #34

While we are discussing PHP, why is the ternary operator nesting behavior different from every other mainstream language using "?" and ":" ?

Presumably: Rasmus got the precedence wrong when he wrote the parser, and it's way too late to fix it now.

Re: Addition of 1 and 1 in PHP

#86
post #79

Earlier quoted context omitted.

You know, planes are a very simple concept: something that flies. Aerospace engineering should reflect that.

CRUD apps are inherently simpler than airplanes, and unlike airplanes no one dies when your CRUD app crashes.

That was a hyperbole.

Re: Addition of 1 and 1 in PHP

#87
post #19
post #11

Earlier quoted context omitted.

I think he is mocking the general pattern of over-engineering and PHP just happens to be the language he wrote this in. At least PHP is not a language known for massive over-engineering. Usually people associate the exact contrary with PHP. But there is indeed a recent trend towards better object oriented designs in PHP and with it comes also more over-engineered code. But I have yet to see any Java-style absurdity.…

Don't you think that, when it comes to OOP features, PHP recklessly introduced lots of Javaisms which lose lot of sense when applied to a dynamically typed language? I believe the author had exactly that in mind.

definitely not. can you name one feature that has been added that isn't useful to a dynamically typed language?

The only one i can think of is object type hinting which alone isn't that big of a deal.

Re: Addition of 1 and 1 in PHP

#89
post #19

Earlier quoted context omitted.

Don't you think that, when it comes to OOP features, PHP recklessly introduced lots of Javaisms which lose lot of sense when applied to a dynamically typed language? I believe the author had exactly that in mind.

definitely not. can you name one feature that has been added that isn't useful to a dynamically typed language? The only one i can think of is object type hinting which alone isn't that big of a deal.

Umm... Interfaces? Abstract methods and classes? Finals?
Post reply on HN