91 comments

[ 3.2 ms ] story [ 165 ms ] thread
Love it, if only PHP were like this. My favorite is definitely the catch block, sorry, would_you_mind block!
Please tell me someone has implemented most of the control structure stuff as a DSL in Ruby. I would find that a most hilarious prank.
This is worth a patch to PHP core... not that it would get accepted.
Why wouldn't they accept localization efforts? ;-)
I still remember with dread working on a Word Basic "application" to generate MS Help documents for an internation company's ISO 9001 quality manual back when it was still Word Basic. One challenge was that the Norwegian subsidiary had "inherited" this code from the Danish subsidiary. And Word Basic was localized.

The problem is, some of the code had been cut and pasted and saved as text and Danish and Norwegian are very close so sometimes that would work, and sometimes it would seem to work but errors would lurk around every corner, and only occasionally would it fall flat on its face in obvious ways (if it'd been transferred from a different language version at least it'd been more likely to be obvious on reading through the code what needed to be modified..)

I am of an opinion that it should be an option for people who really want it, but it should not be an acceptable industry practice to write code/comments in a language other than English. Latest example of this is the official Sony PSM SDK, which has half of its documentation and code comments in Japanese. So now Sony has to pay somebody to actually translate it, instead of simply insisting on their Japanese programmers using English in the first place, which I am pretty sure they are perfectly capable of. The same situation with the official PS3 SDK - but that was released more than 7 years ago now,so I doubt that they will ever fix it. And that's a product for which you have to pay serious money as well, so it's completely unacceptable.
Have you ever tried to work in a language other than your own? It's non-trivially harder. Also, Sony sell their SDK in several countries - why translate it into English, rather than say, Spanish (or insist they use English, rather than Spanish).
Of course I have, English is not my native language and all of my code and all of my comments are in English. I frown upon people who write comments in my own language in the code, I see it as not professional.

And insist on using English, because most programming languages are in English. It is defacto standard for programming and computers in general, and I am not discussing it - it's just how it is. Therefore selling a commercial product and providing documentation only in Japanese is a massive oversight on Sony's part.

    would_you_mind {
        // Code here
    } actually_i_do_mind (Exception £e) {
        // Politely move on
        cheerio('Message');
    }
amazing
actually_i_do_mind is a tad confrontational. If I might suggest:

    would_you_mind {
        // Code here
    } sorry_im_afraid_that_might_present_something_of_a_challenge_right_now (Exception £e) {
        // Politely move on
        cheerio('Message');
    }
Funnily enough, I remember back in the days of Windows 95 when many older (british) people were first getting to grips with computers I helped a few of these people on occasion with various problems.

A common complaint I actually heard was about how you could tell that the computer was american because of how blunt and "rude" the error messages were and why weren't computer sold in Britain better mannered?

Better if it was

  would_you_mind {
  // Code here
  } i_cant_be_asked (Exception £e) {
  // Politely move on
  cheerio('Message');
  }
Instead of using sorry_im_afraid_that_might_present_something, maybe this'd be better: what_the_devil_are_you_talking_about
I also think Alert('xxx') should be replaced with Sorry('xxx')
Everyone seems to have missed the most natural form for us Brits:

    would_you_mind {
        // Code here
    } im_afraid_so (Exception £e) {
        // Politely move on
        cheerio('Message');
    }
This article pops up every few months, but I still love it every time.

  cheerio('Message');
Right, now try PHP in Cockney rhyming slang.
O that someone would create a preprocessor so I can write like this - it would be spiffing!

  Yes, connexion.
No, connexion. From the Wikipedia article he links:

  The spelling connexion is now rare in everyday British usage.
You should read the comments for an extensive discussion on connexion.
It's also pretty rare here in Britain to say "Good morrow" or refer to each other as "fellow subjects of the Crown". Maybe we should give him some artistic flexibility here.
Actually I use 'good morrow' fairly regularly, but with dry undertone.
If you know of any good en-US <-> en-GB references, please let me know!

I manually went through half a dozen dictionary files - all of them were terrible, full of things like "connexion", and even words that haven't been used since Chaucer's time. The online dictionaries aren't much use either, all the American ones are wrong, and the OED is far too out of date to be of any use (Britain is absorbing a lot of American words and spellings at the moment)

Edit: And let this be a lesson to anyone else trying to localize a website from en-US to en-GB: Every reference you have to hand is wrong. If you don't get an actual British English speaker to look over it, we will laugh at you.

Edit2: Dug up some of my notes from an en-GB <-> en-US dictionary file we attempted to use:

We don't use "gaol" or "gramme" anymore

"Ton" and "tonne" are different measurements, not translations of each other

"Practise" and "practice" are not interchangeable

"Check" cannot be globally replaced with "cheque"

"Terrorise" is not and has never been a word

> "Terrorise" is not and has never been a word

Really? That's how I've always spelt it.

In the UK, hardly anyone who has gone through puberty uses "super" or "wicked" as a superlative.
http://spiffingcss.com/ deserves a mention here "the preprocessor made for Brits"

No more scratching heads when things like the following don't work:

#id {

  text-align: centre;
  text-transform: capitalise;
}

:)

I see center and meter so much I often get confused when I'm required to write them correctly!
Having lived in the US for a few years (but now back in the UK) I get confused by many of the UK/US spelling differences. Not the -ise/-ize or colo[u]r type stuff, but things like "tyre/tire", "centre/center", "litre/liter", etc. It'll eventually sort itself out I suppose.
Pity us Canadians, then. We use a pseudorandom mixture of the two. There are, apparently, rules, but they change weekly and there is something in the Statute of Westminster that forbids any discussion of them. No two Canadian English spelling dictionaries agree on anything, nor do any of the style guides. We just carry on and hope that no more than 30% of our Canadian readers think we're idiots on any given day.
Someone with one watch always knows the time, but someone with two watches is never quite sure…
Bear in mind that while homographs in American English, "metre" and "meter" are different things.

  "Parse error: syntax error" -> "You taking the piss, mate?"
Because that's British manners too.
(comment deleted)
(comment deleted)
(comment deleted)
On a related note, perl happily let's you subclass the language to the dialect of your choosing. Here's Australian (ie "strine")

http://search.cpan.org/~simonw/Acme-Lingua-Strine-Perl-0.54/...

or perhaps you prefer to program in Nigerian Spammer?

http://search.cpan.org/~jwalt/Acme-Lingua-NIGERIAN-1.0.0/NIG...

If they made it British it would probably have one of the best queuing mechanisms as well.
With Roger Moore announcing "Worker #3 please"
Said someone who's obviously never gone through the immigration line at Heathrow... The most disorganized, slow, and unfair queue I've ever been in:(
But are people in that line all British? If not, then is just proves the point.
The fact that British are good at queuing (they’re not) wouldn’t imply that they’re good at organising queues (again, also not true).
I have, but only the one for locals. That always seems fine to me.
I made a similar thing for my French company: Javascripte - Un langage pour les vrais JavaScripteurs. https://github.com/mrspeaker/javascripte/blob/master/index.h... It's JavaScript in French (made with Sweet.js macros). All programs are required to commence with "Bonjour Ordinateur".
I was half expecting this from a fellow 'cheese-eating surrendering monkey' (British derogatory term for my country folks). XD
As a Brit living in the US I'm getting a bit tired of the strange fascination you guys have with everything British.

Yes, it was fun at first being asked to say all sorts of words which sound so funny to you guys. Convincing the more provincial of Americans that yes, we do in fact get to meet the Queen for a cup of tea on occasion and yes, she is a very nice lady.

But when I see posts like this I can't help but be reminded of a tired old joke that no-one thinks is funny anymore but they keep on telling it anyway because they don't know how to stop.

Or perhaps I'm just being a grumpy old sod. We're famous for that too.

Although I want to agree, that post was written by a Brit.
Haha yeah I know :) My point still stands about all the rest of it though
The post was written by a Brit: https://twitter.com/Dave_Child
Absolutely old chap. For some reason lots of people seem to think that I'm American and complain that my representation of British people is inaccurate. I think they miss the joke.
I'm also a Brit living in the US, and honestly, I'd say just have fun with it in return. I have, variously:

- Told people my name is Rupert, Tarquin, or Archibald (no-one will question it for fear of sounding rude- doubly so because they think we're very particular about manners)

- "Where are you from?" "Iowa." "Oh..."

- "Harry? Oh yeah, good lad. Bit racist but what are you going to do"

And so on, so forth. I certainly don't begrudge an interest in all things British, because it's preferable to the situation Americans often find themselves in when abroad, where they're considered cheeseburger eating morons.

Just think- they could all be asking you when your last football riot was.

I've done similar to your suggestions, all good fun! I also agree with your point about what they could be asking instead. I shall try to be less grumpy about it all.
> Harry? Oh yeah, good lad.

Surely, that should be "good old chap", if P.G. Wodehouse taught us anything ;-)

Told people my name is Rupert, Tarquin, or Archibald (no-one will question it for fear of sounding rude- doubly so because they think we're very particular about manners)

I hope you used Nigel too!

"Told people my name is Rupert, Tarquin, or Archibald"

Hey now, some of us resemble that remark.

Multiple middle names are good, especially if one of them is St. John. Now that I think about it, that's going to be my go-to first name. "How do you spell that?"

No, it's not just you. My heart sinks every time I see this type of pompous self-regarding wankery.

I suppose some people must like it, because here it is getting voted to the #2 spot. Dear upvoters, that's your prerogative, and even if I could stop you, I'd have no right to. But I must insist on publicly voicing my disapproval.

I don't think the OP was talking about the article, rather, being asked similar questions about 'being British' over and over again.

I'm not really how you could regard this article as pompus self-regarding wankery, but I suppose we'll have to agree to disagree.

I find it pompous because

1. there is opportunity for genuine discussion here (why can't I write my programs in my native tongue? is it an insurmountable problem to let me type 'colour' and for you to see 'color'?) but that opportunity is never taken up

2. It's wrong. If you're going to make a joke at least get it right - this isn't British English, this is "I looked up some random stuff online" English

3. It's not funny. It can be if done well but this post, like many others, takes a "throw everything I found at the wall and see what sticks" approach. Some of them are great - the switch/case statement is a genuine improvement, in my eyes. Some of them are just pompous wankery, as you so elegantly put it.

Just because you don't find it funny does not mean it is not. English is my second language and I had to learn about many intricacies of both American and British English. I personally find this article absolutely hilarious, but it might be because I understand a concept that is quite foreign to Americans - sarcasm. I can clearly see that this article is meant to be a mockery of old, stereotypically British way of speaking, which contrasted with clean and technical American English is amusing - in a sarcastic way. If you can't see it for what it is, but instead see it as being or trying to be pompous,then yes, it is quite hard to see the humour.
Maybe it's hard to hear the humour when the joke's played out - I confess I have heard variants of it a little too frequently.

> I can clearly see that this article is meant to be a mockery of old, stereotypically British way of speaking

I am insisting that it should be a mockery of old, stereotypically British way of speaking - as it stands, it isn't, it's a mockery of what the author and several other people (yourself included) consider to be a stereotypically British way of speaking. I guess what I'm saying is, if you're gonna take the piss out of me, please do me the honour of doing it well.

I'd like to see an Estuary English/Londoner/Cockney version. "Alert" could become "Oy_Wanker", "Try..Catch" could be "Do it!" and "Bollocks" etc etc.
I don't see how any of the points you raised are related to it being pompous or not.

Funny is personal. I found it very funny. And in what way is it wrong? Because British people don't actually speak like that? That's part of the joke. Someone could make an American version with alert("howdy pardner") and I don't think anyone would take it seriously.

I agree about switch/case/break, in all semi-seriousness. what_about/perhaps/splendid is actually more readable.
Yeah, for some reason I seem to stumble over switch/case statements no matter which language I'm in. What_about / perhaps actually makes more sense to me.

I think what the world really needs right now is a dapper programming language.

"British English" is a very political issue. It's not all RP/Standard Southern or Cockney.

insert jokes about forking England's repo and the chaos that ensues

> this isn't British English, this is "I looked up some random stuff online" English

The author is a Brit. I know, for I am he. You're welcome to dislike it, of course. My humour isn't the same as everyone else's. But "pompous" is a bit much. Except for the bits where I was aiming for pompous.

Well I'm happy, and apologetic at the same time, that I'm just not into you Brits. I find you comical, as a people not as individuals, and some of your cultural quirks are interesting. I found the OP humorous and wondered for a brief second if that would have been like the Victorian Era in the USA, but it didn't survive my attention span.

Maybe I'd be more interested in the British people if they used the correct words and proper pronunciation. ;-)

I'll look for ways we can improve as a people, with haste.
Hmm, looks like the tongue-in-cheek was missed by a few people. I wasn't nearly serious enough for a reaction like that.
Maybe that reply was simply toooooooo sarcastic for you (and many many others) to detect?

One thing I have learned about forums etc on the net is that humour written down can be so very badly misunderstood. Particularly dry, witty, sarcastic humour. I used to fall in to all sorts of trouble when I thought I was being oh so funny. I now try to be very careful when I want to be funny.

Dunno if this will mean much to you, but have you ever seen the UK comedy Blackadder? If you have, imagine it written down. It just reads as plain rude. But with Rowan Atkinson performing the lines, it becomes funny. If you haven't seen it, and like oldish Brit comedy, see it. Im sure there must be US shows that work like that too. I suppose reading a script of "Louie" might well seem very unfunny? Perhaps?

I shall now posh mumble and apologise a lot, and go!!!

I didn't down vote you. Congrats to alan_cx for correctly detecting dry British humour in the wild.
As an American it's pretty stale to me as well. I feel like there's enough cross-pollination of our cultures that it shouldn't be that novel anymore.
I'm a brit, living in, er, England, and I'm not sure what you find so objectionable. It just looks like gentle transatlantic banter to me.
Absolutely, old chap.

More over, its not like we Brits don't hold dear all the American stereotypes. IMHO, it would be nice with we Brits and Yanks could banter back and forth like we do with the Aussies. I mean, how boring would live be with out the Aussies ribbing us?

IMHO, there is something a bit too serious about the British relationship with the US, that doesn't exist with, say, the Aussies. Or, is it that the US is very serious with every one? While the US has some great comedians, there does seem to be a huge lack of a national sense of humour. Very serious country the US.

Im British, and I have voted you up for being a proper British grumpy of sod!!!!!
Fun fact, only about 4% of english speakers are english.

I know this article is tongue in cheek, but I like to roll that out when one of my fellow brits goes on a rant about american english.

Me personally, I go with the american spellings all the way.

Another fun fact- the "z" spellings are actually the original. After people left for America, all things French became fashionable, including spelling. A favourite of mine to pull out when a fellow Brit is spouting language-hate.

(I still use the "s" spellings, though)

Ask them what the official national language is of England as well. ;-)
What is it? I looked it up hoping to be surprised and all I found was that it's supposedly English (no surprise) and that Polish is now the official second language apparently. Even Wikipedia didn't help. http://en.wikipedia.org/wiki/Languages_of_the_United_Kingdom

I'm really curious now, please tell us the answer.

England doesn't have an official language (or maybe it was the UK), neither does the US.
IANALinguist, but like a lot of 'fun facts', I think that's only half true. Saying the 'z' spellings are invariably the originals is as wrong as saying that for 's' endings.

The idea is that the words originally came from ancient Greek, where they had the ending -ιζειν, pronounced with a z. The trouble with that is that not all these words did come from the Greek. E.g. realize/realise was (IIRC) a French invention, and they spelled it réaliser. And even in the ones that did come from the Greek, not all of them had the -ιζειν ending - e.g. analyse/analyze was ἀνα·λύω (pronounced analuo); I guess the French gave it the -yser ending.

(The real solution, IMO, is to reject the idea that the 'correct' spelling of a word is the one closer to how it was spelled in the language it was invented in).

Yes, but don't the Australians and other non English, English speakers tend to use the British spelling vs the American spelling?
I read HN every day. And yet, somehow, I miss my own work appearing here. Typical. I was probably too engrossed in drinking tea and eating scones to see it.