Believe me, I am a Web designer. The reason why this page looks so odd is because you're viewing it in a browser that doesn't support Cascading Style Sheet positioning. It doesn't work in particularly old browsers. However, if you scroll down, you'll find all my content. Don't let this site fool you, I've designed plenty of sites that work in older browsers, this was just my first step towards what is the future of Web design.

heisel.org

heisel.org > Blog > 2004 > 07 > 16 > Entry

PHP’s object syntax

Friday | July 16, 2004 | 3:55 pm  

PHP 5 is out, and with it comes better support for objects.

Having been smitten with another P language, I haven’t played with PHP much recently, but one thing struck me as odd.

What’s up with the object references in that language?

PHP uses -> as a seperator, instead of a period — does that strike anyone as odd?

Other languages use dot-notation — which is a fancy term for a period.

So while some of us would do this: foo.bar()

PHP users have to do this: foo->bar()

While the arrow is nice, a good visual way to indicate that you’re accessing an object’s method or properties, is it really worth two keystrokes (three if you count the shift to get the >)?

It may seem minor to some, but it feels fairly disruptive to me.

My hands are used to belting out a period, and often — us journalists like short sentences, and we like our periods (semicolons need not apply).

P.S. Apologizes for not mention our new Adsense ads — its a trial at the moment. If you find them too much, do drop a comment… we’re about as attached to them as we are to -> notation.

Permalink | Comments (0) | Categories: Technology

Comments

Comments are closed.

Disclaimer: I work at The Atlanta Journal-Constitution. The opinions expressed here are my own, and do not reflect those of the AJC, Cox Newspapers, Cox Enterprises nor any other party.

Mail carrier N. Sorenson delivering Christmas mail through the snow. (Chicago Daily News/Chicago Historical Society)