News for hackers. Stuff that matters.
Re:If PHP Were British by corin_ on Saturday August 20, 2011 @09:02AM (#2906539)
I find myself getting genuinely annoyed when having to write things like "color" in CSS.

I wonder, though, as fun as it is to think about these jokes, what serious implications it had. Let's say, for example, it actually had been started with variables using a £ rather than $, would it have made any difference at all?

Re:If PHP Were British by citricsquid on Saturday August 20, 2011 @09:09AM (#2906557)
really? I'm British and I'm quite amazed at how I can (without ever thinking about it) switch between colour and color. I wonder if maybe some people approach programming as a different language (eg: color isn't colour, it's color, it is a unique thing) and then some approach it as an extension of their own language.
Re:If PHP Were British by polymatter on Saturday August 20, 2011 @09:29AM (#2906589)
Also a Brit here. I used to get annoyed, but eventually I think it seeped into my system as a different language as you put it. About 2 years ago I had a colleague get very angry with me for writing code analogous to:

Color colour = new Color();

To me, it makes perfect sense, and tbh didn't realise I was even doing it. I definitely endorse everyone standardising on American spelling though, now its been pointed out to me.

Re:If PHP Were British by copper on Saturday August 20, 2011 @11:23AM (#2906820)
Strangely, I do that too. I tend to blame my education :)

Amusingly enough, (though not strange, if you consider its origins) Haskell uses the British spelling. Off the top of my head, the colour types are defined in the Data.Colour module.

Re:If PHP Were British by ender7 on Saturday August 20, 2011 @12:00PM (#2906902)
After seeing him give a talk, I've come to the conclusion that Simon Peyton-Jones is possibly the most British man alive.
Re:If PHP Were British by amirhhz on Saturday August 20, 2011 @01:39PM (#2907154)
If anyone is interested:

http://ontwik.com/haskell/simon-peyton-jones-a-taste-of-hask...

I don't know if this is the one you meant, but I watched it a while ago and I think it's well worth the time: SPJ is great to listen to and you actually pick up a good amount Haskell and functional concepts.

Re:If PHP Were British by jacques_chester on Saturday August 20, 2011 @10:58PM (#2908383)
He'll have to apologetically briskly out-stroll Stephen Fry first.
Re:If PHP Were British by benjiweber on Saturday August 20, 2011 @02:01PM (#2907229)
class Colour extends Color {} // problem solved.
Re:If PHP Were British by Lewisham on Saturday August 20, 2011 @03:59PM (#2907560)
I never had much of a problem with 'color', but grey/gray got me every single time. Always went with the British spelling.

However, at this point, I actually can't remember which spelling is which. I have to look it up. 'a' is the American one, right? (gosh, I hope I'm right)

Re:If PHP Were British by hazexp on Saturday August 20, 2011 @11:50PM (#2908467)
There's an easy to way to remember which is which. GrEy is English, grAy is American.
Re:If PHP Were British by pash on Sunday August 21, 2011 @01:54AM (#2908616)
Of course, both spellings are common in American English.
Re:If PHP Were British by elliottkember on Saturday August 20, 2011 @09:52AM (#2906631)
I've often wondered this. I had a friend who couldn't spell to save his life when he was writing prose - but when he wrote code he was fine. Never understood how that worked.
Re:If PHP Were British by MattJ100 on Saturday August 20, 2011 @01:22PM (#2907099)
I'm glad you said this - I'm exactly the same. I automatically type "color: gray" when coding, I wouldn't dream of using them them outside my text editor.

It may not be limited to natural vs programming language though. I also have no issue daily switching between 0-indexed and 1-indexed languages, but I hear an endless stream of complaints about the latter language from people who insist they can't do that.

Re:If PHP Were British by troels on Saturday August 20, 2011 @10:06AM (#2906659)
Are you saying that you don't? I most definitely think of code as being an extension of language. Code occupies this rather unique field where it is part machinery and part language. Approaching it only as machinery, limits your possibilities.
Re:If PHP Were British by citricsquid on Saturday August 20, 2011 @10:12AM (#2906665)
Maybe that's why I'm a terrible programmer then.
Re:If PHP Were British by SoftwareMaven on Saturday August 20, 2011 @11:01AM (#2906775)
I doubt it. While it may limit your parent's capability (if he thought of it as a second language), I think it would a little presumptuous for him to imply it limits yours. I know lots of people who approach coding differently than I do, yet they still do just fine (even if I can't watch them code because it drives me crazy :).
Re:If PHP Were British by troels on Saturday August 20, 2011 @02:01PM (#2907228)
It would be presumptuous if I was to say that not thinking that way would make you a bad programmer; I'm sure there are many ways to enlightenment. And many types of enlightenment, for that matter. But I would venture to say that being able to think of programming as language, is a strength. Whether you use this paradigm as the primary frame for writing software, is a different matter. I find it very powerful.

See also: Literate programming, or - more recently - Domain Driven Design (In particular: Ubiquitous language).

Re:If PHP Were British by corin_ on Saturday August 20, 2011 @09:11AM (#2906558)
Maybe I just don't code enough to have got used to it.
Re:If PHP Were British by radiowave on Saturday August 20, 2011 @09:30AM (#2906593)
In BBC basic it was indeed COLOUR, which took me some unlearning.
Re:If PHP Were British by handelaar on Saturday August 20, 2011 @12:26PM (#2906960)
VDU 17 would have saved the day there.

</old_fart>

Re:If PHP Were British by to3m on Saturday August 20, 2011 @04:09PM (#2907595)
Just type C. - stands for either, takes up less space than having a VDU17 in the program!
Re:If PHP Were British by handelaar on Thursday September 01, 2011 @08:18PM (#2952369)
Well, sure, but that gets expanded into 'COLOUR' when you do a LIST
Re:If PHP Were British by tristanperry on Saturday August 20, 2011 @03:42PM (#2907503)
When I was younger it'd annoy me. I'd always forget and slip back into writing colour. Then I'd wonder why the text or background colour of something wasn't changing. A few minutes later (of checking I was editing the right file, that I was changing the property of the right id/class, etc etc!), I'd finally realise I was simply 'misspelling' it. DOH!

Now, though, things have clicked and I find I can very easily switch between color and colour when needed.

Even to the point that if I'm typing on a US based site, I tend to use color (and Americanized spellings), and on non-US sites I tend to British spelling. Can take a while to get used to though.

Anywhoo, I loved this blog post :) Especially the:

Words fail me at this point. How is any self-respecting gentleman expected to make head or tail of these "words". It beggars belief that anyone could allow such distortions of words to be entered into a programming language. They, along with the myriad of similar errors, should be reverted to their proper forms immediately:

Bit!

Re:If PHP Were British by randlet on Saturday August 20, 2011 @11:21AM (#2906813)
I write a fair bit of wxPython code and one of the things that always struck me as surprising is that you can use widget.Color or widget.Center interchangeably with widget.Colour and widget.Centre!
Re:If PHP Were British by abhaga on Saturday August 20, 2011 @01:49PM (#2907184)
> Let's say, for example, it actually had been started with variables using a £ rather than $, would it have made any difference at all?

I cannot see £ sign on my keyboard, so that would be slightly inconvenient. :)

Re:If PHP Were British by gmac on Saturday August 20, 2011 @02:19PM (#2907279)
Indeed, nor is it in ASCII. So it might at least have encouraged attention to be paid to character encoding issues a decade or so earlier!
Re:If PHP Were British by Someone on Sunday August 21, 2011 @02:23PM (#2909793)
Who cares about ASCII (American standard code for…) in a British product? This, of course, would use BS-4730 (BS = British Standards Institute.) it has £ where ASCII has #.
Re:If PHP Were British by willyt on Saturday August 20, 2011 @03:32PM (#2907465)
There's no # on mac British keyboards! You have to hit option-4 (did I get that right, don't have a keyboard in front if me) to e.g. comment ruby code...
Re:If PHP Were British by JimDabell on Sunday August 21, 2011 @05:23AM (#2908830)
It's ⎇-3, not 4. ⎇-4 is ¢.
Re:If PHP Were British by andyking on Saturday August 20, 2011 @03:58PM (#2907555)
It is option-4. But I almost went and bought a new keyboard before I discovered that.
Re:If PHP Were British by rbanffy on Saturday August 20, 2011 @12:51PM (#2907023)
> Let's say, for example, it actually had been started with variables using a £ rather than $, would it have made any difference at all?

I think that had more to do with the $ usage in Perl rather than with currencies.

Re:If PHP Were British by Sodaware on Saturday August 20, 2011 @11:52AM (#2906884)
The biggest problem would be that the £ symbol is not on US keyboards. The # symbol takes its place, but is called the pound sign rather than hash.
Re:If PHP Were British by voyou on Saturday August 20, 2011 @05:52PM (#2907825)
That would be an advantage, not a problem. No-one wants vulgar yanks sullying a classy language like PHP.
Re:If PHP Were British by arethuza on Saturday August 20, 2011 @12:30PM (#2906970)
Map $ to £ - problem solved!
Re:If PHP Were British by mapgrep on Saturday August 20, 2011 @12:45PM (#2907005)
If you do that, you must hit the $ key 1.6 times to get £ to appear, which is kind of a pain.
Re:If PHP Were British by arethuza on Saturday August 20, 2011 @12:59PM (#2907047)
Good point.

How about you press $ eight times - that gives you five £s and then you hit backspace four times leaving you with one £.