Live data from Hacker News

If PHP Were British (2011)

aloneonahill.com

41–47 of 47 posts

Re: If PHP Were British (2011)

#41
post #7

I have to concede that I do prefer the longer abbreviations, especially nowadays when most editors have auto-completion, although of course there are limits. A healthy balance between (0) and (1). This also reminds me of those ridiculously long class names (2). (0) my_structured_query_language_connect() (1) SHFILEOPSTRUCTW [0] (2) InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonPainter [1] [0]…

This is part of the code-as-docs ethos which has really changed how I write everything. I try to make my code as intuitive as possible to obviate comments and documentation that only explain what the code is doing. You could also call it code-as-prose. This is impeded when languages have popular modules with names that are absolutely unintuitive, like the Python "requests" module. Requests what ? Oh, HTTP? Then it sh…

> I try to make my code as intuitive as possible to obviate comments and documentation that only explain what the code is doing. You could also call it code-as-prose.

I do this, Often I can save typing by liberal use of 'clever' features but I avoid them because if I have to stop to reason them out the poor sod reading my code (Which is often me in 6mths) will as well.

It's one of the things I dislike the most about JS, there are 18 different ways to skin the cat, some of which set the house on fire opposite but only if it's a monday and the cat isn't undefined.

It's what happens when a language accretes instead of gets designed.

I miss Pascal.

Re: If PHP Were British (2011)

#42
post #26

Since Rasmus Lerdorf was in Canada, I wonder what this would look like if it were in Canadian English. It would retain the dollar signs and serialize(), but switch to "colour" and "centre". It would be required by law to support a French version for every keyword. All PHP developers would have the advantage of free treatment for carpal-tunnel and other RSI injuries. What else?

It would be imperative to thank the request handler, example images would be maple leaves and example data sets would be hockey teams.

Re: If PHP Were British (2011)

#43
post #33
post #29

exit() would be called brexit() as some of the commenters pointed out... but instead of actually exiting, it will hang indefinitely trying to choose which exit code to return.

brexit() is when you try to break from a switch but accidentally leave the EU.

Do you mean when you try to `splendid;` from a `what_about`?

Re: If PHP Were British (2011)

#44
post #29

exit() would be called brexit() as some of the commenters pointed out... but instead of actually exiting, it will hang indefinitely trying to choose which exit code to return.

If I ever get around to updating the article, this is going in :)
Post reply on HN