While 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.
I'm not a native English speaker, but when I was explaining some basic programming to my English ex-girlfriend I mentioned "parenthesis" at some point, and she had no idea what they were. Turns out, they're "brackets" in British English; I didn't even know parenthesis is American English.
Even though I typically use British spelling and idioms I still prefer and use parenthesis because it's just clearer and less easily confused with square brackets.
She also kept typing "colour" and such in CSS. Since then I've always made sure "color" and "colour" both work whenever I add a setting of CLI for it. I wish the English-speaking folk could agree on a way to spell things; can you all maybe have a war over it or sort it out some other way?
I've never thought of "parentheses" as being a US-English term, after all we have the word "parenthetical"*. I'd agree "parentheses" is a bit technical compared to "brackets", but I'd certainly expect any native speaker to know what it meant.
*) Plus there's the very English joke, and no this isn't something generated by ChatGPT:
One day, Shakespeare and Marlowe encountered an elderly man with a very straight back and bandy legs. After the old man passed by, Shakespeare turned to his colleague and said:
"Marlowe, if you were to include that man in your next play, how would you introduce him?"
Without any hesitation, Marlowe replied: "Lo! Here comes a venerable gent, his back is straight, though his legs are bent."
Marlowe then said: "Will, how would you put it?"
Shakespeare pondered a moment then suggested: "What manner of man is this, who wears his balls in parenthesis?""
I’m French and the similitude of a lot of words in British is problematic, because I’m never sure I’m not inventing words. Colour for example sounds like a misspell of “couleur” for me, whereas color feels more English. But maybe it’s just because I consume a lot more American media than British.
Seems there are some words seen as high level that a French would immediately recognise whereas the relaxed counterpart make no sense for him. Example : "facilitate". I’m French, this word sounds like horrible "franglais" for me but may look classy for an English (?).
And then there's French Canadian and French French. I find it weird how a lot of English native speakers see them as 2 different languages, as if they were more different than the Texas and London English dialects. hint : nobody's gonna call you a muppet in Texas.
() Brackets, [] square brackets, {} curly brackets, and <> angle brackets were the terms I learned in Canada. Although I was always familiar with the word "paranthesis", it always felt foreign and unnecessarily formal and technical. I believe curly brackets are also known as "braces"?
The etymology of faucet and tap is interesting (from Oxford online dictionary):
> late Middle English (denoting a bung for the vent hole of a cask, or a tap for drawing liquor from a container): from Old French fausset, from Provençal falset, from falsar ‘to bore’. The current sense dates from the mid 19th cent.
> Old English tæppa ‘peg for the vent-hole of a cask’, tæppian ‘provide (a cask) with a stopper’, of Germanic origin; related to Dutch tap and German, Zapfen (nouns).
Both had the same classical meaning from different origins, but the British chose the German/Dutch word while the Americans chose the French/Latin word.
> Both had the same classical meaning from different origins, but the British chose the German/Dutch word while the Americans chose the French/Latin word.
One of the most interesting books that I've read in a long time:
Highly Irregular: Why Tough, Through, and Dough Don't Rhyme--And Other Oddities of the English Language [0]
This gave me incredible insight into the formation of modern English. I read it voraciously. Very good book to understand why it's such a mess.
I bought it after hearing an interview with the author on a podcast.[1] I think anyone (English-speaking) who enjoys and appreciates language (and podcasts) will get a kick out of it. The author is passionate and excited by the topic, so very entertaining.
I don't thing British "chose" a German/Dutch word, it was the native choice. We speak a Germanic language, though it has been quite influenced by French and Latin loan words. Faucet sounds like a much "posher" word to me, native British English speaker.
I think this is a common theme. British English has earthier words, American English seems to have fancier terms in a lot of cases - but sometimes it is reverse. Pot luck really, though I think AmE is the fancier one for general terms. The one that always sticks in my mind is the AmE "transmission", which is in BE, "gearbox". I wouldn't know what "transmission" means if someone hadn't told me, but I could have worked out what gearbox was from the fact it was talking about gears.
Further, "transmission" refers to the thing sending power over the driveshaft. The RPM and torque are actually rather analogous to the frequency and amplitude of a radio wave rotating around a polar graph.
I didn't say it was an accurate name, but it is what we call it. Just like we call the "gas pedal" the accelerator. (which is obviously an example of the reverse - fancier word vs earthy word.)
I find this interesting because I (and most Americans?) see BE as much more “posh” than AmE … I guess I’ll be looking out for actual word differences/etymologies more now
According to the OED, the use of faucet as a tap for drawing liquid out of something dates is attested as far back as 1400s - I'd consider that current sense (as does the OED).
It is silly, but even small things like foo and bar could be a barrier or distraction at least. At least I am thinking more about 'Why the heck foo and bar? Why?! Why not A or B or other more neutral and common? What could be the hidden meaning?...' than about the logic of the example.
That's the point, though; you use 'foo' and 'bar' when you want the reader to focus on an abstraction, instead of potentially distracting them with the details of a concrete situation.
Once the ‘programming bit’ is flipped in someone’s brain, I think metasyntactic variables like foo and bar become very instinctive and easy to reason about. You have activated the part of your brain that visualizes things as abstractions with placeholders.
The problem is when foo and bar are used in material aimed at beginning programmers who are still developing that instinct and who haven’t yet got that bit set.
It seems the "foo" didn't come from that, but once "foo" was in wide adoption, the "bar" likely suggested itself automatically to someone familiar with "fubar".
Yup. The point of an example is to let the learner leverage their intuition about one concept to guide their understanding of the other. It requires realistic examples. Nobody has useful intuition around what a "foo" is. It contradicts the very point of an example.
"Foo" and "bar" are hacker culture signifiers, like "yo" and "word up" are hip-hop culture signifiers. Even if you don't consider yourself a part of hacker culture, understanding its history and peculiar lingo is probably a good idea if you contribute to a site known as "Hacker News".
The Jargon File, though largely historical and obsolete, is a good place to start:
It was probably paired with "bar" because of FUBAR though.
My dad referred to the figure known as the "impossible trident" ( https://en.m.wikipedia.org/wiki/Impossible_trident ) as a "foobar". It was used as a warning to engineering students to check their technical drawings.
It's funny, I wrote it very much tongue-in-cheek of course, but as someone who grew up writing HTML and then CSS and using "color" all the time there's probably a little nugget of genuine pent-up irritation hidden in there somewhere.
I 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)
I'm too young to understand that reference :D My first OS was Windows XP and googling things was already pretty well established. Didn't know that Microsoft used to publish an encyclopedia, interesting!
Oh you think that was bad? When I was that age my teachers were flagging to my parents that I kept switching between American and British spellings at random. Doing lots of programming in US English was causing my schoolwork to be frequently marked wrong (the teachers were fortunately quite forgiving about this type of mistake). It was just hard at that age to remember which of "color" and "colour" were correct in different contexts and ditto for a bunch of other words. Also for a brief period I thought the right way to write a zero was with a strikethrough because of the monospace fonts.
Other fun US/UK cultural issues: interview questions like "how many pingpong balls fit in a school bus". To Brits a school bus could be literally anything from a coach to a small vehicle, they aren't standardized like in the US. Even when you remember the big yellow buses from films, how big are they? If you never saw one in real life it's hard to imagine. Also it took a while before I figured out that "ping pong" meant table tennis. Fun times.
Which is tragic, because it's more correct mathematically.
I'm American, and I grew up with the short scale, so I always though it made obvious sense: every time you add a comma, you jump up. So 1,000,000 is a million, 1,000,000,000 is a billion.
But 10^9 is a billion and 10^12 is a trillion makes very little sense. I mean, I know it's 1,000 * 1,000^2 and 1,000 * 1,000^3, but it seems to make more sense to me to say that a million million is a billion, and a million million million is a trillion. So 1,000,000^2 and 1,000,000^3, with the bi and tri right there.
Still, that ship has long sailed, so 1,000 * 1,000^3 for a trillion it is.
I've been thinking we can un-sail that ship by getting explicit about which scale (when it's relevant).
Always "million", but any time you say "billion" say "long billion" or "short billion". If it catches on, after a sufficient period we can drop the "long" once everyone realizes that long is better (and gives us milliards and billiards).
My early programming was on BBC Micro and some Acorn machines in school. There, the programming and documentation was all spelt correctly, from memory. "colour", "dialogue", "catalogue", and so on. It wasn't until I started on a PC that I got the Americanisation of computer stuff.
To this day, I still name things internally with the spellings I'm used to despite working in an international company (where it makes sense of course, not in a way that might lead to actual time wasted due to confusion.)
In high school, circa 1980, there were a few of us who were into computers. In math class, one of us thought it would be cool to write zeros with slashes through them, because that is how our computers printed them. He got marked down on his homework because a zero with a slash through it meant the empty set. Context matters I suppose. I think there are enough clues in this comment that this was in the US, not the UK.
Here's a fun story. I left academia right after my Ph.D and moved to London, where I started freelancing as a software developer. Naturally, I joined a coworking space, since I was new in town and wanted to meet people. This coworking space had a weekly social event where new members were introduced over drinks, and I was promptly asked to go on stage and introduce myself and say a few words about my professional background.
I hopped on stage and started talking about my Ph.D in cognitive neuroscience. I told them that I was studying how the attentional system is involved in conscious perception. To make it a bit more tangible, I asked everybody to close their eyes, and said "I've now been talking to you for a few minutes. With your eyes closed, I want you to tell me what color pants I'm wearing."
If you're British, you're likely roaring with laughter at this point. For the Americans: pants means underwear in the Queen's English.
When a graduate student, I once shoved a sample into a -80 ºC freezer with a template on the front showing what everything was, written in pencil as an index (everything was stored in a metal rack in a particular position and they all looked identical from the top – it was a bit of a pain to find your sample if you didn't know where to look as you'd have to lift them all out and rummage). Someone had removed something and not removed its name from the index on the door, and I'd placed my sample in its place, let's say into spot H6.
I went around the corner and popped my head into the nearest office – a female (and conventionally attractive) American post-doc I didn't know terribly well was sitting there typing and I just said, "Hey, <name> do you have a rubber I could borrow in a hurry for just a moment? I'll bring it back in less than two minutes, promise!". She changed colour, burst out laughing, and handed me "an eraser"...
Huh really. This is like with Hoover then, where the term became generic? I only ever heard ping-pong used as the name of the sport.
Another thing that confused me and lots of other British children: why do so many American program brand names begin with the apparently meaningless letters EZ? Eee-zed doesn't mean anything!
I believe the confusion is over the letter Z. Commonwealth countries would pronounce that "zed" while in America that letter is pronounced "zee" (rhyming with letters like B, C, D, etc.).
This is a commonly cited problem with using IQ tests outside of their specifically applicable cases. They tend to assume a common world and then ask you questions about navigating that world, but not everybody lives in that world to start with.
Huh, I have done a lot of IQ tests in my life but none assumed a certain world view.
They were all abstract figures and a question like 'after figure A, B and C, which follows?', the answer to which was usually pretty obvious in a weird kinda way.
I've not seen any that made any reference to the real world.
There might better sources than those, the first one in particular has a lot of its own cites.
My memory from class was a bit of a different angle than fairness which is what those talk about. The issue brought up there was that IQ tests were designed for the specific purpose of placing a corpus of students with varied prior education levels in the right grade. For that purpose it worked well: if you didn't do well on the English portion because your English is non-native and the school is charged with teaching you English, practically speaking we do need to send you back a grade because you need that specific skill and that's where you'll get it.
But being non-native English doesn't mean that you're less intelligent, so the score isn't really applicable for measuring that basically unrelated thing. Despite the name, measuring intelligence isn't what it was for. I also vaguely remember it having story questions like "the left tap is cold water and the right tap is hot water, how much do you need to turn each to get 25% warm water" being asked of people that didn't have running water in their homes and that being a problem. But again don't lean too much into my memory, I could be remembering this all wrong.
I live in France. When trying to teach my kids some Ruby, I showed them how to use _puts_ to print stuff. That would always crack them up, as it sounds (in French pronunciation) just like a not so nice word.
now imagine what it's like for natives of a different language. you stumbled over a single, rather specific keyword - they might have confusing or no associations at all with terms like for, switch, case, instance, compile, parse,... they might have a textbook in their language (or not), but the statements might feel like hieroglyphs or, worse, lead their mind in the wrong direction
I had a similar problem as a non-native English speaking teenager trying to learn how to code for the first time. The function in one of the challenges
named sleepin(day, vacation) had to return true if the day was a Saturday and and vacation was true. I had no idea what that idiom meant and I think that significantly contributed to my struggle to learn coding as a beginner.
When 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.
In UK we have French macarons, but also macaroons ... which are one of two distinct types of biscuit, both with the same name -- one made of almond and one made of coconut, although the latter is more like a flat cake.
Certainly not. By law. Biscuits are luxury goods, and as such are taxed appropriately, whereas cakes are essential food items, and have a lower tax rate. This culminated in a VAT tribunal in 1991 [0] where the makers of Jaffa Cakes argued that said items were cakes not biscuits, in order to get the lower tax rate. One of the winning arguments was that cakes go stale, while biscuits go soft. I think this could count as precedent for a proper legal definition of the difference between cakes and biscuits. (Of course, American-style cookies aren't biscuits either by this definition.)
Aha! Well, I got fooled by Wikipedia, which links to the French page "macaron" from the English Macaron page as its translation: https://en.wikipedia.org/wiki/Macaron
That really does just objectively make less sense, I don't understand that debate - you don't try and apply butter to your sandwich after layering cheese and tomato or whatever, you spread the more solid thing first.
I live in Devon, so I'm compelled to agree. Cream goes first, no matter what the Cornish have to say on the matter. Although, apparently the late Queen preferred the Cornish method.
I'm sure you only mean to be anti-royalist^, but the implication for the rest of the citizens by birth of this fairly multicultural country is extremely intolerant if not racist.
^Understanding that just makes it a baseless & lazy argument, a joke at best.
I make biscuits and scones regularly and yes, it's the same recipe minus sugar, which is similar to the suet dumplings recipe here EXCEPT you would not boil/poach a biscuit - that would make it a dumpling. I'd say it's more the method of cooking that defines a dumpling than the dough recipe - you could use biscuit dough but it doesn't have to be and often isn't.
This is not sarcasm. I have a distinct idea in my head of what a cookie should generally look like, and it doesn't look like a biscuit. I can see the confusion, both have chocolate chips in and your classic digestive usually doesn't, but I'd put good money on my ability to identify one or the other
Though funny side note, there is a historic reason that function names are so inconsistent in PHP: The length of the name of a function was used for hashing. So you wanted a to vary the length to achieve a roughly even distribution of lengths.
I 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
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:
This 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.
You 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.
That 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 :)
As 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.
It 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.
Actually, 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.
In Britain we usually write "2 December" or "2nd December" even though it's spoken as "the second of December". The words are often slurred together, "the second've December" or "th'second've December"; "the thirtieth've April".
Actually pronouncing it carefully with a clear "of" emphasizes the date, either for clarity or because it's otherwise important.
My extended family is in Scotland while I'm naturalized here in the US.
Our wedding "save the date" notices caused a bit of confusion - they were published with 6/3/06 (Jun 6) and sent in Feb. From my uncles: "we'd love to come, but that's a bit short notice..." Oops. The formal invites had the dates spelled out.
Much 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.
The 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"
It’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.
I 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.
There 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.
According to Wikipedia[0], using "ise" is still the British spelling, as well as Australian spelling. However, the Oxford spelling of these words are using "ize".
After a customary search, I can't seem to find any sources that suggest using "ise" might be French, and made popular by British newspapers, besides the below Wikipedia article claiming newspapers using the "ise" spelling, instead of "ize". I'd love to see some sources on this if you have any.
I grew up in Britain, and have been spelling using the "ise" version, but since I've started working for a US company, I've started using "ize" everywhere since it's just easier. In addition, it's still accurate British, when using the Oxford spelling. Although, it did take me a while to get accustomed to changing my writing.
I've always understood the "rule" to be Greek-origin words take 'ize' and Latin-origin words take 'ise'. Personally I would rather have one or the other consistently.
I use 'ise' in all cases by default, but if I know my audience is American I use 'ize'. I'm not precious about it.
The z spelling is influenced by Greek, I believe. I think it's fair to say -ise is characteristically British, since it's widely used here and not in the U.S.
> Some users may have angst about typing characters such as ü and ß, but Odersky dismisses this idea: “Being completely unable to enter half the syntax on an English keyboard may make coding slower, but that never seemed to hold Scalaz back.”
I have fractionally more sympathy for the post-conditional `if` - `statement if x;` - because at least then you're not trying to invert things at the end of a sentence.
Only fractionally because I hate all post-conditionals with a passion. They're the garden paths[1] of coding.
Hum... The only thing that changes is that the exception comes on its negated form. It doesn't make code scanning any harder, or interpreting it any more convoluted.
Personally, I do hate both of those (including the Python's ternary operator). But there is something with the bashism it shares, of `do_it() or die "trying"` that looks quite nice.
Especially 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!
A 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.
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()
the "Perl" distinction is because they are PCRE (Perl-compatible Regular Expressions) - PHP used to* have ereg() and family, which used POSIX Regular Expressions.
I 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"
> 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"
Only 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.
Sir, I am confounded that you would seek to equate the noble vernacular present betwixt the fine men of industry in Our Great City, with that of the filthy street patois which serves only to tarnish the fine polish of gentlemanly character.
I 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”.
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).
Nah, 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
> 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)
> 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.
I 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.
The 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.
Accents 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.
Brits 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.
f 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.
Tbh a lot of the aristocratic address stuff that's still present in other languages is long gone from British English, except for people employed as butlers and people sarcastically mimicking the forms of address used by butlers. Even Americans are more likely to address people as "Sir" than Britons under pensionable age, and English hasn't had the polite second person pronoun most languages do for a long time, never mind involving a dilemma over whether to use a construction that would literally translate as "would your grace..." in everyday interactions to avoid people getting upset by the overfamiliarity of "you"!
We do love deliberate understatement, evasion and saying please a lot though!
British English has a very flat hierarchy, with no T/V distinction as found in French or Russian, and very little use of honorifics or titles (even for authority figures like university professors).
British politeness is not based on hierarchy, but based on (sometimes excessive) apologising for inconvenience.
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.
> 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.
Some 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.
Dunno 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.
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.
Hm? 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.
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.
> and before that an actual bona fide London accent that my grandparents had.
It wasn't really, though - it was just the first one you heard. Accents are always in flux.
(An interesting comparison for me is the Sex Pistols' car crash Bill Grundy interview against a modern London yoof accent. Major, major change just within my lifetime).
By bona fide London accent I mean that the way both sets of my grandparents spoke was different to each other in London and different again to their cousins that lived in Kent and Surrey. The Thames Estuary accent pretty much replaced the London accent and those of each of the Home Counties.
Sure, I get it. I'm not trying to be nitpicky (I swear!) I'm just trying to point out that the Elizabethan London accent, the Victorian London accent, and today's London accent are no less bona fide.
Interestingly JRM doesn't have any blue blood at all despite the whole 'honourable member for the early 19th century' persona, public image is a fascinating thing!
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"'.
Do 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)
Britain 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.
Always 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.
You 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.
A 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.
the 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.
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!!!!
That 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.)
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.
We 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;
Are 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).
I 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:
I 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?
I'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.
I 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.
The 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!
So 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.
The '$' 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.
A 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.
In practise it's just #$%#$% annoying to have to write "color" instead of the proper spelling. #@$#@^% you you bastardizers of the beautiful word "colour"! :-D
OK, 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.
It'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.
The 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.
That's Jeeves and Wooster. And that was itself a parody.
I use some archaic phrases; I refer to "chaps", some disgraceful act being "a bit off", my hat is my "titfer" (cockney rhyming slang hasn't been restricted to cockneys since the 50s). But I don't pretend to be an Edwardian bourgeois twit, like the ridiculous Rees-Mogg.
I'm sorry I didn't get your humour; it's a drag to have to explain a joke.
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.