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

PHP’s object syntax

Friday | July 16, 2004 | 3:55 pm  

PHP 5 is out, and with it comes better sup­port for objects.

Having been smit­ten with another P lan­guage, I haven’t played with PHP much recently, but one thing struck me as odd.

What’s up with the object ref­er­ences in that language?

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

Other lan­guages 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 indi­cate that you’re access­ing an object’s method or prop­er­ties, is it really worth two key­strokes (three if you count the shift to get the >)?

It may seem minor to some, but it feels fairly dis­rup­tive to me.

My hands are used to belt­ing out a period, and often — us jour­nal­ists like short sen­tences, and we like our peri­ods (semi­colons need not apply).

P.S. Apol­o­gizes for not men­tion 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

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)