6 ms·
If PHP were British
- Jeremy1026 14y agoAn oldie, but goodie.
- Fizzadar 14y agoLove it, if only PHP were like this. My favorite is definitely the catch block, sorry, would_you_mind block!
- ishansharma 14y agoactually_i_do_mind cheerio :)
- timdorr 14y agoPlease tell me someone has implemented most of the control structure stuff as a DSL in Ruby. I would find that a most hilarious prank.
- DomBlack 14y agoThis is worth a patch to PHP core... not that it would get accepted.
- pyre 14y agoWhy wouldn't they accept localization efforts? ;-)
- vidarh 14y agoI 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..)
- gambiting 14y agoI 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.
- lil_cain 14y agoHave 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).
- gambiting 14y agoOf 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.
- GotAnyMegadeth 14y agowould_you_mind { // Code here } actually_i_do_mind (Exception £e) { // Politely move on cheerio('Message'); } amazing
- mmahemoff 14y agoactually_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'); }
- jiggy2011 14y agoFunnily 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?
- mbesto 14y agoBetter if it was would_you_mind { // Code here } i_cant_be_asked (Exception £e) { // Politely move on cheerio('Message'); }
- JonnieCache 14y agoI think you may have been mishearing http://en.wiktionary.org/wiki/arsed http://en.wiktionary.org/wiki/arsed
- radiowave 14y agoYes. I've heard a few stories of foreigners getting that wrong when working in the UK. Suffice it to say that, "I can't be arsed" is not a great thing to say to your boss.
- 14y ago
- pettazz 14y agoThis article pops up every few months, but I still love it every time. cheerio('Message');
- Gigablah 14y agoRight, now try PHP in Cockney rhyming slang.
- mjt0229 14y agoYou beat me to it.
- porker 14y agoO that someone would create a preprocessor so I can write like this - it would be spiffing!
- quarterto 14y agoYes, connexion. No, connexion. From the Wikipedia article he links: The spelling connexion is now rare in everyday British usage.
- Kiro 14y agoYou should read the comments for an extensive discussion on connexion.
- corin_ 14y agoIt'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.
- tlarkworthy 14y agoActually I use 'good morrow' fairly regularly, but with dry undertone.
- ZoFreX 14y agoIf 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
- BellsOnSunday 14y ago
- thomseddon 14y agohttp://spiffingcss.com/ 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; } :)
- buttscicles 14y agoI see center and meter so much I often get confused when I'm required to write them correctly!
- alexkus 14y agoHaving 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.
- stan_rogers 14y agoPity 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.
- claudius 14y agoSomeone with one watch always knows the time, but someone with two watches is never quite sure…
- TazeTSchnitzel 14y agoBear in mind that while homographs in American English, "metre" and "meter" are different things.
- zalew 14y agohttps://news.ycombinator.com/item?id=2906480 https://news.ycombinator.com/item?id=2906480 https://github.com/dzautner/British-PHP https://github.com/dzautner/British-PHP
- sdfjkl 14y ago"Parse error: syntax error" -> "You taking the piss, mate?" Because that's British manners too.
- deleted 14y ago[deleted]
- deleted 14y ago[deleted]
- deleted 14y ago[deleted]
- freyfogle 14y agoOn 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/Perl.pm 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/NIGERIAN.pm http://search.cpan.org/~jwalt/Acme-Lingua-NIGERIAN-1.0.0/NIG...
- jerf 14y agoOr Latin: http://search.cpan.org/~dconway/Lingua-Romana-Perligata-0.50/lib/Lingua/Romana/Perligata.pm http://search.cpan.org/~dconway/Lingua-Romana-Perligata-0.50... http://www.csse.monash.edu.au/~damian/papers/HTML/Perligata.html http://www.csse.monash.edu.au/~damian/papers/HTML/Perligata.... I mention this because this is no mere regex "rename the keywords" exercise either, but a decent attempt at really making Perl work in grammatical Latin.
- ericcholis 14y agoperchance...otherwise is awesome.
- gadders 14y agoIf they made it British it would probably have one of the best queuing mechanisms as well.
- plant42 14y agoWith Roger Moore announcing "Worker #3 please"
- modoc 14y agoSaid someone who's obviously never gone through the immigration line at Heathrow... The most disorganized, slow, and unfair queue I've ever been in:(
- rimantas 14y agoBut are people in that line all British? If not, then is just proves the point.
- claudius 14y agoThe fact that British are good at queuing (they’re not) wouldn’t imply that they’re good at organising queues (again, also not true).
- gadders 14y agoI have, but only the one for locals. That always seems fine to me.
- mrspeaker 14y agoI made a similar thing for my French company: Javascripte - Un langage pour les vrais JavaScripteurs. https://github.com/mrspeaker/javascripte/blob/master/index.html 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".
- touristtam 14y agoI was half expecting this from a fellow 'cheese-eating surrendering monkey' (British derogatory term for my country folks). XD
- peacemaker 14y agoAs 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.
- jpswade 14y agoAlthough I want to agree, that post was written by a Brit.
- peacemaker 14y agoHaha yeah I know :) My point still stands about all the rest of it though
- buffportion 14y agoThe post was written by a Brit: https://twitter.com/Dave_Child https://twitter.com/Dave_Child
- DaveChild 14y agoAbsolutely 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.
- untog 14y agoI'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.
- tterrace 14y agoLooks to be down, here's the cache: http://webcache.googleusercontent.com/search?q=cache:Fdewfzbi-ZkJ:www.addedbytes.com/blog/if-php-were-british/&hl=en&gl=us&strip=1 http://webcache.googleusercontent.com/search?q=cache:Fdewfzb...
- tomelders 14y agoFun 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.
- untog 14y agoAnother 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)
- thejosh 14y agoAsk them what the official national language is of England as well. ;-)
- bpatrianakos 14y agoWhat 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 http://en.wikipedia.org/wiki/Languages_of_the_United_Kingdom I'm really curious now, please tell us the answer.
- thejosh 14y agoEngland doesn't have an official language (or maybe it was the UK), neither does the US.
- SEMW 14y agoIANALinguist, 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).
- DaveChild 14y agoI 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.