News for hackers. Stuff that matters.
Re:PHP Weekly improvements by fooyc on Thursday May 23, 2013 @10:29AM (#5756971)
Ugly monkey patching everywhere, open classes, insecure by default (e.g. mass assignment), global states, model classes easily too much tied to a single controler, active record pattern, ...
Re:PHP Weekly improvements by rbanffy on Thursday May 23, 2013 @10:42AM (#5757053)
It's interesting. Much of what I think is beautiful about Ruby (and Python, and Objective C, and Smalltalk) is what people who like PHP consider ugly. I, myself, and it's a matter of taste, find PHP (and most of the code written with it) ugly. There is no objective measurement for ugliness.
Re:PHP Weekly improvements by prollyignored on Thursday May 23, 2013 @12:18PM (#5757672)
There you go https://github.com/runekaagaard/snowscript

PHP is a kludge. You'd be surprised to know that world is made of kludges with a few elegant hacks thrown in and not the other way round.

Performance hacks are always kludges. Can you live without them ?

Honest question, should I waste my time worrying about the "What makes syntax elegant" than working with the existing kludge ? What makes that time well spent ?

Why shouldn't I seek beauty in output and look for a programming language that get's me the output quickly ?

Re:PHP Weekly improvements by jiggy2011 on Thursday May 23, 2013 @12:53PM (#5757887)
Well, everyone has their own definition of "elegant syntax" which makes objectivity difficult.

I guess the best tools are ones which help you produce output quickly whilst being conductive to elegance and readability, Ruby's terse syntax and features like blocks are an attempt at this.

It also depends on how big your project will get and how long it will need to be maintained for.

There are plenty of projects I have seen where chunks of extremely bad code have been pumped out to create a 1.0 with a giant list of features. Of course such code becomes increasingly costly to maintain or modify without breaking. In many cases they would have been better off cutting features from the 1.0 (most features are unused anyway) and concentrating on quality.

Re:PHP Weekly improvements by rbanffy on Thursday May 23, 2013 @12:56PM (#5757911)
> You'd be surprised to know that world is made of kludges

No. I wouldn't. I'm an electrical engineer by training.

> Performance hacks are always kludges.

Not always. Sometimes they bring out some inner beauty in the code that was previously hidden. But, again, sometimes they don't.

> Honest question, should I waste my time worrying about the "What makes syntax elegant" than working with the existing kludge ?

It depends on your priorities. If you were a poet, would you be more worried about making good poetry or selling more books?

> Why shouldn't I seek beauty in output and look for a programming language that get's me the output quickly ?

Again, it depends on what is your output and how you relate with the fact that the thing generating that output is a horrible mess.

Re:PHP Weekly improvements by prollyignored on Thursday May 23, 2013 @01:47PM (#5758229)
> No. I wouldn't. I'm an electrical engineer by training.

I agree. Electrical, Electronics, Civil, NASA aka Real Engineering will not have more kludges.

Phone Radiation / Drainage Systems have a few "Oh well I'll just leave it here ..."

But what about medicine, law, newspapers ? Are they not part of the real messy world ?

I agree to be a kludge worker and an idealist part time poet :) (pragmatic choice)