18 ms·
If PHP Were British (2011)
- wizofaus 4y agoAre there actually any genuinely UK-English-based programming languages? You'd think if anything (given the origin of the name) it'd be Python, but while as far as I can tell none of the keywords are specifically US-spelling, there are definitely function/field names in the standard library that are (certainly "color", "tokenizer", "capitalize" and "center" to pick a few).
- aryehof 4y agoI'm expecting merica-influenced languages to start using "wanna" instead of "try", and "axeme" instead of "input". Perhaps the use of "fanny" instead of "end", much to the roaring amusement of many.
- deleted 4y ago[deleted]
- ChuckNorris89 4y agoI love this kind of humor. Do biritish people really talk that polite IRL all the time? If someone would always talk like that I would seem very fake and off to me and make me very suspicious. The only times I expressed myself like that was in university application letters. I wish someone would do a Scottish or Australian version of PHP complete with swear words. I'd pay good money for that (I have my Alexa set to Aussie, totally worth it).
- tmtvl 4y agoWell, sometimes you get a bit of the classic "you wot mate? Keep your gob shut or we'll have a barney, innit." Depends on circumstances, really.
- techterrier 4y agono.
- dmitriid 4y ago> Do biritish people really talk that polite IRL all the time? The other side of the same humor is re-writing everything with "oi, c*nt, over here, you c****sucker" Aaaand I think it's the same people :)
- twixfel 4y agoSome examples he used are never said. I would say something like "perchance" very rarely, and "Good morrow" never. "Would you mind", well I suppose we say this all the time.
- _the_inflator 4y agoHowever using "perchance" as "if" replacement is somewhat ingenious. Always be polite in your sourcecode. :D
- jrumbut 4y agoThey talk normally but the way they walk is very silly indeed: https://youtu.be/eCLp7zodUiI https://youtu.be/eCLp7zodUiI
- abracadabra_ 4y agoNo. We really don't. People who speak Received Pronunciation (RP) may speak more in this way (look up Jacob Rees-Mogg if you really want to see how stupid it sounds) but they are a small minority of the British people.
- canbus 4y agowe definitely don't speak politely about Jacob Rees-Mogg
- Beltalowda 4y agoHm? He's certainly the smartest and most skilled MP by far. A Victorian gentleman who invented a time-machine to travel 150 years in the future? Name one other MP who can match his genius.
- DrBazza 4y agoI’m curious why you think RP sounds stupid.
- abracadabra_ 4y agoI was more saying that one particular example (JRM) sounds stupid. I don't think this is a contentious issue. However, RP can sound a bit silly with some pronunciations. The same is true with any accent.
- abracadabra_ 4y agoP.S. I'm from Yorkshire so I'm used to accents being mocked.
- DrBazza 4y agoHow JRM speaks doesn’t bother me at all. Must be an age thing. What bothers me is the emergence over the last 10 or 15 years is the new London accent that was previously Thames Estaury in the 90s and before that an actual bona fide London accent that my grandparents had. The new accent is typified by -ah or -ar instead of -er. The police recruitment adverts being the best example. Become a police office-aah instead of police office-er.
- foo42 4y agoNah, it's a caricature of a particular class of Brit, mostly from a particular period. We do have different turns of phrase, some of which are very local even within Britain, but they're not all posh and polite, if anything the greater differences are in our styles of irreverence
- paganel 4y ago> if anything the greater differences are in our styles of irreverence I'd say the self-deprecating humour is also a mainstay of the Brits, encompassing almost all social classes. Granted, I'm not a Brit, but a former boss of mine (I'd also call him a friend) was a Brit and he checked all the stereotypes related to that. Really great guy. They (the Brits) used to also be renowned for their black humour, at least around these parts of the European continent, but I feel that that is beginning to fade out (maybe it has become too culturally sensitive to joke about death? I wouldn't know)
- sph 4y agoRelevant: Stephen Fry explains the difference between British and American humour: https://youtu.be/8k2AbqTBxao https://youtu.be/8k2AbqTBxao
- chrisbaker98 4y agoBritish people also talk like this: https://www.youtube.com/watch?v=B5bqYlsXDdg https://www.youtube.com/watch?v=B5bqYlsXDdg
- snodnipper 4y agoI would imagine those are a subset, where some would be referred to locally as "chavs" https://en.wikipedia.org/wiki/Chav https://en.wikipedia.org/wiki/Chav Folks might note 'In the 2010 book Stab Proof Scarecrows by Lance Manley, it was surmised that "chav" was an abbreviation for "council housed and violent"'.
- Gordonjcp 4y ago> Do biritish people really talk that polite IRL all the time? No, no-one talks like that, and also "British people" don't really talk the same way even from one town to the next. There's not really any such thing as a "British accent". You know how different a New Englander talks from a Texan? That's how different someone from Glasgow sounds compared to someone from Edinburgh, or someone from Manchester compared to someone from Birmingham.
- happymellon 4y agoI would say the difference between West Country, Home Counties, North East and Glasgow is significantly higher than the difference between most US States. Although that's presumably because we have had thousands of years to develop dialects and the US didn't have very long until TV, radio, telephone started mashing dialects from regions together. I can tell the difference between New England and Florida but it isn't quite in the same league.
- Lio 4y agoAccents in the UK aren't even consistent in the same place. My wife and I have different accents and grew up in the same medium large sized town.
- chrisbaker98 4y agoAccents in the UK also have a strong class dimension. Middle class people often speak in a very different way to working class people from the same area.
- chrisbaker98 4y agoThe general pattern observed in linguistics is that accents/dialects/languages and language families have the greatest level of diversity in the area where they originated. E.g. Austronesian is a huge language family that covers an enormous geographic area including Hawaii, the Philippines, Indonesia and even as far as Madagascar, and it contains over 1,000 distinct languages divided into 9 subfamilies - and yet all but one of those subfamilies are found exclusively in Taiwan, where proto-Austronesian first emerged roughly 5000 years ago.
- marginalia_nu 4y agoDunno if there is such a thing as "how British people talk". Something that's struck me about the country is how much the way you talk reflects where you are from and your station in life. Like not just which region, there's frequently dialects/sociolects for different parts of a city.
- pbhjpbhj 4y agoThe smallest dialect areas I know of are next-town/next-city. I'd be interested if you could give an example (email me if you like, see my profile)?
- chrisbaker98 4y agoThere are said to be multiple variations of the Liverpool ("Scouse") accent: https://wikiless.org/wiki/Scouse?lang=en https://wikiless.org/wiki/Scouse?lang=en
- mrtksn 4y agoBrits will say that they don't but if you are coming form a more direct culture you definitely notice the added layer of politeness to everything. There are a lot of other native speakers in the UK, for example from Australia or the USA, and you can instantly tell if this person is from the UK or Australia and it's not only the accent that gives away. Maybe you've heard that the western attitude of smiling for no good reason is strange for Eastern Europeans but this is not like that and you can actually quickly internalise the general politeness of daily interactions. I like it a lot but sometimes can come up as unauthentic, you feel the authenticity when they start using sarcasm.
- toyg 4y agof you are coming form a more direct culture you definitely notice the added layer of politeness to everything Brits will kill me for this, but it's more of an European thing - the Brits just preserved it a bit more aggressively than others, because they never actually abolished the aristocratic system that generated it.
- ChuckNorris89 4y ago>it's more of an European thing Not true. Go to Eastern Europe and see. You'll get much less unintentional smiles or politeness than in the UK.
- toyg 4y ago> Not true. Go to Eastern Europe and see. Oh oh, "yes true", and your note confirms it... What did Eastern Europe aggressively do, in the last century? Destroy aristocracy. So they are at the opposite end of that particular scale.
- oblio 4y ago> What did Eastern Europe aggressively do, in the last century? Destroy aristocracy. Well, I wasn't a big fan of it, but the reality of the matter is... for most of us, someone else destroyed our aristocracy (and all of our intelligentsia with it) for us.
- DaveChild 4y agoNo, it's a joke. Source: I wrote it :)
- mcv 4y ago> Do british people really talk that polite IRL all the time? It's that or cockney. Those are literally your only options if you want anyone from the UK to understand you.
- te_chris 4y agoNope. The telegraph (right wing paper for posh people) was losing its mind about London street slang a few months back (https://www.telegraph.co.uk/news/2022/06/13/wagwan-street-slang-britains-main-dialect/ https://www.telegraph.co.uk/news/2022/06/13/wagwan-street-sl...)
- _joel 4y agoDo we heck. There are many different dialect and accents in the UK, but nobody talks like that (Apart from the 18th Century cosplayer, Jacob Rees Mogg, but thankfully we hear less from him nowadays)
- KineticLensman 4y agoBritain is a patchwork of different dialects and speech patterns with numerous class-based and regional variations. We don't all speak the same any more than Americans do.
- sph 4y ago"G'day Alexa." And I imagine she calls you a cunt once in a while, for good measure.
- Gordonjcp 4y agoI am definitely implementing would_you_mind/actually_i_do_mind structures.
- adzm 4y agoMost of this could be implemented with the C preprocessor. Splendid.
- willcipriano 4y ago> Text speak" is unheard of on the streets of London, as the natural ingrained British grammarian simply refuses to stoop to sending messages of the "c u soon traffic kthxbye" variety Come on now, the streets of London are full of nonsense like this: For example, the word "Aris" is often used to indicate the buttocks. This is the result of a double rhyme, starting with the original rough synonym "arse", which is rhymed with "bottle and glass", leading to "bottle". "Bottle" was then rhymed with "Aristotle" and truncated to "Aris" https://en.m.wikipedia.org/wiki/Rhyming_slang https://en.m.wikipedia.org/wiki/Rhyming_slang
- swores 4y agoI fear you may have fallen into a trap of reading those words without the humour they were intended to convey.
- willcipriano 4y agoI get the joke and made my own
- toyg 4y agoOnly the unwashed or criminal element will ever use rhyming slang - the whole point of its existence is obfuscation from police eavesdropping. I'll have you know, dear sir, that no respected member of the middle or upper classes should ever be found employing such bastardised lingo. The glorious Empire has no use for such trickery.
- commitpizza 4y agoI can only wish the author of this article a good afternoon. (https://www.youtube.com/watch?v=Rj9VljRQzCQ https://www.youtube.com/watch?v=Rj9VljRQzCQ)
- DaveChild 4y agoIt's morning here, but thankyou all the same.
- grishka 4y agoAlso setcookie() and $_COOKIE need to be renamed to setbiscuit() and £_BISCUIT.
- nly 4y agoJust in case Americans are confused as to how us Brits distinguish Definitely biscuits: https://www.abelandcole.co.uk/chocolate-chip-digestives-mr-organic https://www.abelandcole.co.uk/chocolate-chip-digestives-mr-o... Obviously cookies: https://www.tesco.com/groceries/en-GB/products/258025719 https://www.tesco.com/groceries/en-GB/products/258025719 I hope things are clear now. Now if someone could explain to me how a shit savoruy scone is a "biscuit" on your side of the pond... I'd appreciate it
- totalZero 4y ago> Now if someone could explain to me how a shit savoruy scone is a "biscuit" on your side of the pond It may be because "scones and gravy" sounds like it would taste, well...British.
- Veen 4y agoAre those American biscuits like scones? I thought they were akin to dumplings. We really are "two countries separated by a common language". (To be clear, these dumplings: https://www.errenskitchen.com/suet-dumplings/ https://www.errenskitchen.com/suet-dumplings/ Not these dumplings: https://omnivorescookbook.com/recipes/how-to-make-chinese-dumplings/ https://omnivorescookbook.com/recipes/how-to-make-chinese-du... )
- jgrahamc 4y agoHonestly, I've seen this thing multiple times over the last ten years and it's stupid. EDIT: Yeah, go ahead and down vote me. I'm British and I find it stupid. It's a weird caricature and unfunny.
- asddubs 4y agoif it makes you feel any better, I agree it's pretty overplayed and lazy of a joke.
- Beltalowda 4y agoClearly what's needed is a Malcolm Tucker version of this.
- KaiserPro 4y agodo_this{ // try } you_fucking_what (Disappointment £d){ fuckety_bye() }
- taffronaut 4y ago"Hello World" should obviously be "This is London calling"
- digitalsankhara 4y agoBrilliant! Thank you for that.
- Oras 4y ago"Sorry" as a default prefix
- andyjohnson0 4y agoAs with the "please" keyword in Intercal, the compiler would have to enforce its use but not over-use.
- notahacker 4y agoI think "sorry" should be a suffix and "excuse me" the prefix
- mjburgess 4y agoThe ideology behind the extremely contemporary belief amongst brits that "s" is a British spelling is quite strange to me. z is the British spelling and always has been, s is French and was lifted from French. And made wide-spread by British newspapers in the 60s+. What is interesting in this case is this author goes all the way back to "connexion" without realising that contemporary to that spelling would be "specialize"
- siquick 4y agoIt’s not as clear cut as you make out. There are some specific verbs that should always take the ‘s’ in British English – for example, analyse (in American English, analyze). And then there are verbs that even in American English should always take the ‘s’, like revise and exercise.
- mjburgess 4y agoI guess its mostly just amusing that cosmopolitans who are keen to appear "at home with everyone" display the same cultural parochialism as everyone else -- namely even doubling down on historical French spelling (over historical English) simply to avoid association with the US. Similarly, of course, the scottish adopt historical englishisms; and so on, and so on. With `z` however it's a project of those who'd claim to be above such.
- dspillett 4y agoThere seems to be a perception in some that in cases where s and z are both officially valid (most of the time), that z is a vulgar Americanism (nasty pointy letter with a harsh sound, both of which stand out compared to the more refined smooth shape & sound of our lovely s!), when, as you point out, z is historically more correct in “proper” English. I don't think it is that they see s as english-english as such, but that they see z as american-english so go with s as an act of identity preservation. I prefer -ise over -ize, I'm not sure why, maybe it fits better with how I pronounce/emphasise things when speaking. Though it isn't the case that either is more right in modern English: while -ize predates -ise, for about half a millennium it has been the case that both are valid so it is just down to preference. Which ever you pick, just be consistent. There are some cases where one is considered valid and which one varies by variant of English, such as analyse/analyze, which is probably part of where the s-is-English comes from – applying a specific exception widely as if it were a rule. There are a few things that many are convinced of about English which turn out to be quite false: the singular “they” being another one that has caused much discussion in recent years, or the not-splitting-infinitives thing which some are still determined to boldly hold on to.
- ksangeelee 4y agoThe '$' being used in variable names I think originates from the word 'string', from when it was necessary to differentiate types of variable in the code. It never related to currency.
- shaftoe444 4y agoA bit like people who get annoyed by the word soccer, an English word originally to distinguish Association Football (soccer) from Rugby Football (rugger) and other codes.
- martin_a 4y agoI really think you shouldn't take the article, its conclusions and recommendations too serious.
- dools 4y agoYou mean ... seriously?
- elric 4y agoI always assumed it originated with Perl, where $ is for scalars and @ for arrays.
- avian 4y agoI'm sure this use of $ character is much older than Perl. One counter-example I know first hand: Sinclair ROM BASIC uses $ for denoting strings, in both variable and function names. The one I have in a Spectrum is copyrighted 1982, around 5 years before first Perl was released. I'm sure there are older examples like this.
- mananaysiempre 4y agoYou know what? Compared to the bland and non-self-evident “protected”, “hereditary” is a remarkably apt name. I’m not sure the concept itself is that useful, but if you have to have it, why not.
- Grayskull 4y agoAs someone who has not done enough object oriented programing not to confuse "private" and "protected" on every occasion I would welcome this to all languages.
- cardanome 4y agoI actually tanked one of my first job interviews because I totally blanked out and forgot what the difference between private and protected was. I just never used it in practice. And I still don't.
- 9dev 4y agoThat actually comes in useful as soon as you write library code, but seldomly in application code (at least mine): You'd use protected for internal methods intended to be used, and probably overwritten, by children classes. This allows defining internal extension points to customise the behaviour of a class. Take a response caching middleware, for example, that uses a CacheStrategy class to control the behaviour of the cache. There's an interface, so we can depend on it in the middleware: interface CacheStrategyInterface { public function shouldCache(Request $request, Response $response): bool; } and there's a default implementation, shipping with the library, which works for 90% of use cases: class DefaultStrategy implements CacheStrategyInterface { public function shouldCache(Request $request, Response $response): bool { if ( ! $this->isMethodCachable($request)) { return false; } return $this->isSuccessful($response); } // This method can be modified by user code: Maybe they implemented // an API with a `"success": false` in the response body, despite // the status code? There's no way to know that, let alone provide a // configuration switch for every possible failure condition in user // code implementing our middleware. protected function isSuccessful(Response $response): bool { return $response->isSuccessful() || $response->isRedirection(); } // This method shall not be modified: Whether an HTTP request may be // cached is defined by specification, not implementation. private function isMethodCachable(Request $request): bool { return $request->isMethodCacheable(); } } Users may extend this implementation, and override the `isSuccessful` method with their own implementation used to check whether a response handled by the app was actually successful (and thus should be added to the cache). This method isn't significant from the outside of the class - it would add needless weight to the API contract of our library. But still, there's value in allowing users building their own caching strategy to override it with their own checks. Such an implementation might look like this: class CustomStrategy extends DefaultStrategy { protected function isSuccessful(Response $response): bool { return $response->body('success', false) === true; } } There's no boilerplate here, no need to reimplement the whole shouldCache method, when only a single, granular, override is enough. And that is why protected can be helpful :) (This was taken from a Laravel library I maintain. If you want to check the full example, see here: https://github.com/matchory/response-cache/blob/master/src/Support/BaseStrategy.php https://github.com/matchory/response-cache/blob/master/src/S...)
- andyjohnson0 4y agoA long time ago I spent a large part of a year writing some woftware in Rexx [1] on an IBM 3090 mainframe. Rexx was designed by Mike Cowlishaw, who (like me) is British, and (from memory) the language included a few "Britishisms". For example it's keyword for selecting output text colour allowed "colour" as well as "color". It also used "say" to print text. Twenty year-old me was a little bemused. [1] https://en.wikipedia.org/wiki/Rexx https://en.wikipedia.org/wiki/Rexx
- johnchristopher 4y agoI think DBASE III+ also used `SAY`
- Doctor_Fegg 4y agoPostgres allows "EXPLAIN ANALYSE" as well as "EXPLAIN ANALYZE".
- Lio 4y agoBBC BASIC accepts both COLOR and COLOUR as keywords. https://www.bbcbasic.co.uk/bbcwin/tutorial/chapter07.html https://www.bbcbasic.co.uk/bbcwin/tutorial/chapter07.html
- ivan_gammel 4y agoIf $AnyProgrammingLanguage was German, unary “not” operator would be postfix. if (something == null nicht) { … }
- prennert 4y agoI think it would be more beautiful that that: If (something nicht null ==) { } I.e. falls (etwas nicht null ist) { },
- lqet 4y agoWhy? It's obviously the == that should be postfix. "Falls etwas nicht null ist" if something not null ==
- danbruc 4y agoFalls etwas nicht gleich null ist. if something not == null Falls etwas nicht ungleich null ist. if something not != null
- tgv 4y agoWe all know that das Nichts nichtet (nothingness nothings; Heidegger), so it should be falls etwas nichtet
- marcosdumay 4y agoSo, just a stack-based language?
- ivan_gammel 4y agoTo reflect the spirit of negating the meaning in simple sentences, not to follow exact grammatical order (but that’s also cool idea)
- fatih-erikli 4y agoin Turkish too if not something if something degilse
- rbonvall 4y ago
- shaftoe444 4y agoShit patter
- gdprrrr 4y agoIn a similar vein: Mark Rendle - The Worst Programming Language https://www.youtube.com/watch?v=vcFBwt1nu2U https://www.youtube.com/watch?v=vcFBwt1nu2U
- s_dev 4y agoIf a scripting language was to be from Cork, Ireland: https://adam-lynch.github.io/ked/ https://adam-lynch.github.io/ked/
- rpastuszak 4y agoI propose keep calm {} carry on {} for exception handling
- nickdothutton 4y agoI learned some BCPL before I ever touched C, simply because the system I was working on came with a BCPL compiler and not a C one (it was CP/M). BCPL always seemed to have a certain Englishness to it which I only noticed when I came later to other languages of US origin.
- dspillett 4y agoAlways amusing that when we try be overtly fancy, or Americans try to sound more English, we tend to latch onto things the language purloined from the French, such as nouveau. And purloin.
- Lio 4y agoPlease, using French borrow words to sound more cultured is so passe.
- checkyoursudo 4y agoCareful there, you might be committing a faux pas. I prefer to use ad hoc and sui generis Latin phrases to make myself seem more intelligent than I really am.
- bombcar 4y agoI love when French words are borrowed and repronounced so you end up with Grand Prix being "Grand Pricks" instead of "Gran pree".
- xen2xen1 4y agoYou would so, so totally love how the residents of Versailles, Indiana, US, pronounce their town's name. I'm very 'Merican and it makes me want to bang my head into to a wall.
- bombcar 4y agoA number of city names become shibboleths themselves - things like Spokane being pronounced "spow cane" instead of being spoken as spokan. Of course if you go back far enough, even the original place names of many places are simply "bastardized" versions of the original. It's how Latin becomes Italian over time.
- fatih-erikli 4y agodie() -> rip()
- Oras 4y agoexit() -> fuckoff()
- denton-scratch 4y agoI assume this is some kind of satire; but satire usually has some kind of point to make, and I don't get the point of this article.
- felixthehat 4y agoUs regular human beings call this 'fun' if that's any help to you?
- denton-scratch 4y agoOK, well that's how I read it: a jokey article (i.e. fun) that looks like satire (something that bites), but without any actual satirical bite or point. But perhaps I'm wasn't sharp enough to get the satirical point. And I didn't see it explained in the comments. If it's just ragging on PHP's deficiencies, (a) that's old-hat, and (b) most of what the author teases about isn't actually a problem with the language.
- felixthehat 4y agoIt's just the author's dry, tongue-in-cheek British humour. He's not really attacking anything – just a bit of fun using English instead of American English.
- denton-scratch 4y agoThe author is British? OK, well I'm surprised. Nobody in Britain uses the kinds of phrases he makes fun of. I enjoy dry, tongue-in-cheek humour; it's my stock-in-trade (except when I might be talking to foreigners, like here on HN; it can easily misfire). I read the author as being a non-British English speaker.
- DaveChild 4y ago> The author is British? What ho, old bean. Yes, I am.
- jrpelkonen 4y agoIf PHP has “continue”, it should be “thank_you_sir_may_i_have_another”.
- fakedang 4y agoWhen I read this, I could hear Rule Britannia playing at the back of my head. I will be right back, going to prepare some tea and biscuits... Cheerio!
- type0 4y agoGreat article, also see https://www.citrine-lang.org https://www.citrine-lang.org it is a highly localized programming language I submitted it for discussion here https://news.ycombinator.com/item?id=33829193 https://news.ycombinator.com/item?id=33829193
- neilv 4y ago> PHP, on the other hand, is full to bursting with abbreviations and acronyms which are entirely unnecessary: Consider Scheme, where even the ubiquitous `stdout` is `current-output-port`.
- zelphirkalt 4y agoThat heading gave me a great idea for the PHP language maintainers/devs: Make your language support keywords depending on the locale of the system the interpreter/compiler runs on! Users will love this "feature"! (I hope no one in their right mind takes this idea serious.)
- danbruc 4y agoExcel. At least kind of.
- ht85 4y agoUS: SUM(...) FR: BAGUETTE(...)
- Joker_vD 4y agoRU: СУММ(...) For additional fun, the cell names still use Latin letters so you have to constantly switch your keyboard layout from Latin to Cyrillic to Latin back to Cyrillic back to... or pick the cells and ranges with your mouse. Golly, I wonder why they didn't reuse this approach when they translated Excel to Japanese and Chinese.
- dylan604 4y ago"Shakespeare would be ashamed" To be proper shakespearen, would perchance() {} otherwise {} not be to be() {} or not to be {}
- aequitas 4y agoWhen I was a kid I thought the Pascal language was a German programming language and Basic was English. This was because when I started with computers I got a book from my uncle about programming serial and parallel ports. The book was in Dutch but the Pascal code examples where commented in German and the Basic ones in English. And because all language keywords where just as foreign to me they might as well have been German in my mind. So I stuck with the Basic examples, which where “English”, because at least I had English lessons in school. Eventually I learned both languages where English and stuck with the Pascal examples because they where the more useful ones, and I learned a bit more German along the way to decipher the comments.
- pjc50 4y agoAs someone who learned on BBC basic, every time I do graphics programming I am mildly irked that APIs use "color" rather than "colour".
- bryanrasmussen 4y agothe amount of cool tips I see to help programmers save a couple characters in writing make me think if it were colour people would complain about the extra work.
- npteljes 4y agoI similarly never knew whether to use gray or grey. Fun fact, CSS, for one, supports both: https://developer.mozilla.org/en-US/docs/Web/CSS/named-color#description https://developer.mozilla.org/en-US/docs/Web/CSS/named-color...
- hoosieree 4y agoIn new code, compromise with "coulor".
- esskay 4y agoThe worst part of being a British developer is having to go through someone elses code and find they used 'colour' all over the damn place. Just stick to how the rest of the world accepted the use of 'color' instead!
- openplatypus 4y agoColour is just fine.
- bell-cot 4y agoA bit of local colour shows the code to be locally-sourced and sustainable. (Well, with Britain's current political mess..."sustainable" may be stretching it.)
- ldjb 4y agoFunnily enough, PHP actually taught me the Hebrew expression for "double colon", thanks to the infamous T_PAAMAYIM_NEKUDOTAYIM. http://phpsadness.com/sad/1 http://phpsadness.com/sad/1
- pimlottc 4y agoWell that is certainly unexpected, is there a story behind why a Hebrew term was chosen for this character?
- ldjb 4y agoMuch of the PHP internals (the Zend Engine) was created by Israeli developers. I'm not sure why they didn't use English, but clearly they just used their native tongue in this case. https://en.wikipedia.org/wiki/Zend_Engine https://en.wikipedia.org/wiki/Zend_Engine
- joshvm 4y agoI learned to code seriously using PHP so I have some fondness for it, and I believe it's been much improved since back then. But the "Fractal of bad design" post (from 2012 no less, so a year after this one) never fails to amuse: https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/ https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/
- Waterluvian 4y agoThat’s the Canadian dollar sign though. You can tell because it’s worth a bit less.
- deleted 4y ago[deleted]
- KurvaKing 4y ago
- azalemeth 4y agoWhile this is obviously a (good) joke, the differences between cultures often become unexpectedly important in code. I remember being about 13 and learning about OO code and reading Apple's (then excellent) developer documentation. It had an example of a class called "faucet" and lots of text related to American plumbing. At the time I had literally no idea what faucet meant (en_gb: tap) and spent about five times longer trying to understand the metaphor than the actual code. It really left a bitter taste in my mouth: I didn't have a clue what was going on, not because of inheritance or Obj-C, but entirely because I didn't understand what the author probably didn't realise was a culturally sorry metaphor.
- 4ggr0 4y agoI wondered why you didn't just google the meaning of the word like I would've done at that age, but then remembered that this was not a thing back in the days. Also reminds me of when I was stuck in Lego Star Wars and couldn't find the way to solve a level. I then searched for a write-up of said level. At that point I only understood German, but I was still extremely confused by the write-up. The reason was, that the German word for 'hatch' is 'Luke', and Luke Skywalker was a character who was present in that level. I was stuck because I didn't find that hatch and the write-up told me that I 'jump on the platform with Luke and activate a control panel with R2-D2 to make Luke appear so that people can go through the Luke' (very paraphrased, but I think the point comes across)
- la-ruby 4y agoThe would_you_mind {} actually_i_do_mind {} block cracked me up!
- ChrisRR 4y agoNot sure why this is so polite. I think you're more likely to get the_fuck_you_want() { thats_right_keep_walking() }
- kimburgess 4y agoAs a dual citizen living out in the colony, this looks like a great accompaniment to our local preferred language https://aussieplusplus.vercel.app/ https://aussieplusplus.vercel.app/.
- notahacker 4y agoI think the main thing that needs to be included is a deliberate sense of vagueness and uncertainty around even the most basic propositions. Instead of true or false or 1 or 0 values and = operators, British PHP should have constructions like "might very well be", "perhaps" and "not too sure about that" Also needs a very advanced queuing system
- squeegee_scream 4y agoI’ve gotta mention If Hemingway Wrote JavaScript, an excellently funny book, relevant to the thread. https://anguscroll.com/hemingway/ https://anguscroll.com/hemingway/
- tambourine_man 4y agoperchance (£condition) { // Code here } otherwise I actually LOL, well done sir.
- tenderfault 4y agoactually "hereditary" is more sound than "protected", innit? to some extent
- superluserdo 4y agoI was a bit disappointed to see that this article mostly fell back on the trope of British English being extremely verbose and indirect. I think a much more interesting counterfactual would be, If PHP Were Anglish. "Anglish" is the name given to a kind of hobbyist-led reimagining of English that is as close as possible to modern English, but in a parallel universe where the 1066 invasion of England wasn't successful, and English didn't adopt a huge number of French words. https://wiki.anglish.info/wiki/Main_Leaf https://wiki.anglish.info/wiki/Main_Leaf Here are some English words used in computing that are derived from French, and their Anglish equivalents: Binary | Twile Clone | Betwin Command | Bid, behest Concurrent | Bytimely Computer | Reckoner, arimer (from "rime" meaning "number") Engine | Gearwork Event | Happening Multiprocessing | Manyworking Polymorphism | Manishapliness There are also quite a few words that are already Germanic with no French influence: Backup, bandwidth, bit, bookmark, boot(strap), broadband, browser, bug, cookie, download, flash, framework, inbox, keyboard, laptop, mainframe, motherboard, online, output, root, runtime, shell, software, thread, web, wireless.
- flumpcakes 4y agoThis is super interesting. As a native speaker I usually don't ponder on loan words / influences too much, but it is very thought provoking to see these "Anglish" alternatives.
- kaladin-jasnah 4y agoWouldn't it be easier to learn other Germanic languages such as Swedish if we had not loaned so many words from French?
- anthk 4y ago- Band - Mark - Line
- ricardo81 4y agoDialects are pretty variable in Britain (no pun intended), this one seems to prefer old money English.
- pizlonator 4y agoYou had me at perchance/otherwise. Fucking brilliant!
- mypastself 4y agoIf it were from South London, you might replace “sibling” with “bruv” and “true” with “believe”…
- markx2 4y agoNo-one has yet mentioned nonce. Here in the UK, a nonce is "a slang term for a sex offender, especially one convicted of sexual offences against children."
- mike_hearn 4y agoEspecially entertaining when it appears in WordPress plugin error messages. Last year I had to calm down a gentleman who was receiving errors when trying to post a comment which said something like "Illegal nonce detected" - he was quite distraught and thought someone was falsely accusing him of child molestation!
- cyann 4y agoThank you! I've heard that on a episode of Avenue 5 and it was confusing
- Beltalowda 4y ago"Release the pedophile!"
- c7DJTLrn 4y agoIndeed, in the British version of PHP we shall use "princeandrew" instead.
- miiiiiike 4y agoI loved traveling to the to the UK as an American. My only regret is that I din’t learn the language first. So many of the things in London were slightly funny. Road and tube line/stop names (Piccadilly, Elephant & Castle), restaurants (Assault & Battery [fish & chips shop], Nicomsoup), the price of a doughnut and small coffee at Piccadilly (£7.40) and staggering, jet lagged, into a Piccadilly Circus Starbucks for a morning Butty. This was also the trip that I played “Prounce That” with a group of Django developers. What’s “Pronounce That”? Well, we noticed that we kept pronouncing things differently so we started taking turns writing down a common Python/Django package and saying “pronounce that”. Psycho-PG was probably my favorite.
- mnw21cam 4y agoI remember talking to an American visiting the UK who was doubled over in laughter at all the signs everywhere saying "Way out".
- zerocrates 4y agoI (an American) definitely mentally pronounce psycopg2 as "Psycho-PG."
- deleted 4y ago[deleted]
- jnsie 4y agoThe "monty php" comment is great!
- idoubtit 4y agoIt missed another category of USA-centrics behaviour that infused in PHP: the dates. For instance, `mktime(hour, minute, second, month, day, year)`. I've never seen a country outside of North-America that puts the month first, though my experience is limited to a few dozens of countries across the world. Unfortunately, other programming languages also think the USA format is the standard. Formatting dates with Golang relies on using the USA ordering. The more I use it, the more I despise it. I'm from Europe, but I'm so used to ISO dates that I need a small adjustment time to read European formatted dates.
- chasil 4y agoAt the start of my career after graduation, I needed to assume the role of a DNS administrator for Berkeley BIND running on SCO OpenServer. I was encouraged by my ISP to use 20050101 (YYYYMMDD) as part of the zone serial number. I have used that format ever since, especially because it will sort correctly without any special handling.
- Symbiote 4y agoAmericans have asked me why I write "2/12/2022" or "2 December" when "it's not pronounced that way". Well, I pronounce it [the] 2nd of December. Just like they say "4th July!", but only for that single day.
- cameronh90 4y agoIt's ironic that Americans pronounce their independence day in British format.
- pimlottc 4y agoI would suggest it’s completely intentional to pronounce “Fourth of July” differently to distinguish it from every other day.
- jagthebeetle 4y agoActually, Americans wouldn't say "fourth July" – that would likely connote "the fourth iteration of July" in some longer timespan (e.g. "In the fourth July of my adolescence"). "Fourth _of_ July" (or "July fourth") are the Americanisms here.
- c7DJTLrn 4y agoWe could have a "use slang"; directive sort of like JS strict mode. When you declare a variable in this mode, it must be suffixed with "innit" like so; >$my_variable = 5 innit;
- david422 4y agoSo Intellij has been getting super smart with their IDE's. I wonder if they could just add a visual display over this. Every "if" statement could be displayed as "perchance" etc.
- user3939382 4y agoI actually prefer these: PHP, on the other hand, is full to bursting with abbreviations and acronyms which are entirely unnecessary: str_replace() is_int() var_dump() The following changes should improve things: string_replace() is_integer() variable_dump() perl_regex_foo() might even be better than "preg" whereas everyone knows what regex means but "preg" isn't obvious at all. At this point who cares that it came from perl it should really just be regex_foo()
- mh- 4y agothe "Perl" distinction is because they are PCRE (Perl-compatible Regular Expressions) - PHP used to* have ereg() and family, which used POSIX Regular Expressions. * <5.3, 8 years ago
- kapitanjakc 4y agoCentre Center Colour Color Ize ise These were very confusing to learn/ unlearn
- shockeychap 4y agoI don't know why, but this one made me chuckle: would_you_mind { // Code here } actually_i_do_mind (Exception £e) { // Politely move on cheerio('Message'); }
- t43562 4y agoIn practise it's just #$%#$% annoying to have to write "color" instead of the proper spelling. #@$#@^% you you bastardizers of the beautiful word "colour"! :-D
- t43562 4y agoIt's more like this: blah = dosomeaction() bla > 0 innit? # Assertion ..... if read(blah) { return RES_NOT_TOO_BAD; # Everything's great } .... if !read(blah) { go Titsup("sorry mate, no such luck!") # exceptions } line(0,0,100,100, colour=GREY); # It's $##$%^ "COLOUR" damnit!!!! and G-R-E-Y!!!! etc
- account-5 4y agoHad myself a good old chuckle to this.
- cjtrowbridge 4y agoI started writing an includable file to make all of these functions work, but I can't figure out a way to override or replicated if/then as perchance/otherwise. With something like string_replace() it's easy to simply write a new function and redirect the parameters. Is it possible to replicate the way if/then works with other code; like not just a function but then a series of code blocks in braces?
- croes 4y agoIsn't the else in an if-else-statement because of germans? https://news.ycombinator.com/item?id=25406211 https://news.ycombinator.com/item?id=25406211
- hk1337 4y agoSeeing all the long version function names makes me think the British would probably prefer Pascal over C.