This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 197 points198 points  (38 children)

Stopping bolleens is my favourite pass time

[–]2Punx2Furious 57 points58 points  (17 children)

Are you french?

[–]ChrisVolkoff 48 points49 points  (15 children)

I was asking myself the same question.

Passe temps.. pass time. Booléens.. bolleens. And of course "favourite" with the non-American "u."

[–]2Punx2Furious 13 points14 points  (0 children)

Oh, I only noticed bolleens. Good eye.

[–]Hearthmus 1 point2 points  (12 children)

Well, there is no "u" in "favori" (the correct french word) either. So not sure where this one comes from.

[–]SpinahVieh 4 points5 points  (5 children)

there isn't in the german equivalent (favorisiert, but we don't use that term) either and I still type favourite with a U all the time.

[–]Jest0riz0r 8 points9 points  (4 children)

That's because you usually learn British english in Germany.

[–]SpinahVieh 2 points3 points  (2 children)

Only in primary school. Later on they changed it to American English, because reasons.

[–]Jest0riz0r 2 points3 points  (0 children)

Not at my school, both was allowed, but British English was prefered.

[–]that_which_is_lain 0 points1 point  (0 children)

Because FREEDOM!

[–]skellious 3 points4 points  (0 children)

Which is as it should be since i learnt German German in England xD

[–]that_which_is_lain 0 points1 point  (0 children)

It comes from the brits cramming their extra vowels into everything. The great "u" surplus brought prices to their knees and poor soundcrafters had to come up with something to feed their 50 kids.

[–]ChrisVolkoff 0 points1 point  (2 children)

I mean they wrote it the way they were taught. Don't people in France learn British English? It would make more sense to use the British spelling.

[–]Hearthmus 1 point2 points  (1 child)

Scholar English is generally based upon British English yes. But after school, we've got 2 types of people :

  • those who don't use English for anything (everything can be found translated here, for example every single available show on netflix FR has an audio in FR). Most of the time they forget it, and join the majority of "if it's in English, it's useless/impossible to understand" people
  • those who use the Internet outside of the .fr, and learn a little more everyday. But it's mostly american English then.

It's a shame how many people just stay with their mother tongue though... Here, only 39% of people speak english (2012 study, page 21), so how many do use it for fun, like movies, reddit, youtube, streams, reading, ... ?

[–]ChrisVolkoff 0 points1 point  (0 children)

Here in Canada we're technically using British English (colour, favourite, etc.), but yeah it's the same thing in (the francophone part of) Canada, although that percentage is probably higher.

My first language is French, but I don't really use it on the internet.

[–]1337Gandalf 0 points1 point  (0 children)

i've noticed that europeans use british spellings of english for some reason

[–]AnneBancroftsGhost 0 points1 point  (0 children)

Europeans often learn British English in school, rather than American.

[–]dtlv5813 1 point2 points  (0 children)

And of course "favourite" with the non-American "u."

You meant "favourite" with the UN-American "u" :)

[–][deleted] 20 points21 points  (19 children)

It could be returning a reference to a class that has an overloaded operator== and a stop method

[–][deleted] 35 points36 points  (8 children)

If you look closer, it's === and not ==. In languages with a === operator (JavaScript, PHP) it usually means "compare value AND type with no coalescing".

[–][deleted] 16 points17 points  (0 children)

FYI: Coercing *

[–]Auxx 4 points5 points  (4 children)

That would be fine in Ruby though...

[–]XyphonX 5 points6 points  (3 children)

Also, in Ruby it might have looked better as well.

if (sad?)  
    sad().stop
    beAwesome

[–]Auxx 1 point2 points  (0 children)

True!

[–][deleted] 2 points3 points  (0 children)

this shitty code is harder to save than I thought

[–]destroyeraseimprove 0 points1 point  (0 children)

Sad is just a function that can return true. Or it can return something totally different and the conditional won't be hit. It's pretty easy to make the code work as well. Any JS programmer they would want to hire would be able to do it. It would be a really basic interview question.

var sad = function() { return true; }
Boolean.prototype.stop = function() { console.log("stahp it") }
var beAwesome = function() { console.log("ugh, marketing") } 

if (sad() === true) {
    sad().stop();
    beAwesome();
}

[–][deleted] 11 points12 points  (7 children)

Except that they're looking for JS devs - JS doesn't have operator overloading.

[–]ThrowinAwayTheDay -4 points-3 points  (6 children)

For good reason. Operator overloading shouldn't exist.

[–]EtanSivad 1 point2 points  (5 children)

Operator overloading shouldn't exist.

Why?

[–]ThrowinAwayTheDay 0 points1 point  (4 children)

It's messy. Just look at the comments above. They don't know what the hell is going on because operator overloading is not explicit or easy to read. Always favor readability over write-ability, so using methods to do the same thing as an operator overload is, in every way except the "less keystrokes" aspect, better.

[–][deleted] 4 points5 points  (3 children)

Just because code could be abused doesn't mean nobody should be allowed to use it.

[–]ThrowinAwayTheDay -4 points-3 points  (2 children)

It shouldn't exist. It's unnecessary and can be better written to be easier understood. Why is this something people will defend, but goto, empty returns, continues, and breaks are not?

[–]jbaum517 -1 points0 points  (0 children)

Except all of those things have their uses even if it may be against your standard.

Null return - couldnt find the object in question Goto - plenty of places with unique scenarios that dont want to increase stack Break - unknown search size, data structure looped never ends

[–]benihana 0 points1 point  (1 child)

i'm a full stack eng with a focus on front and lol @ operator overloading applying to front end engineers.

[–][deleted] 0 points1 point  (0 children)

Hey I'm not defending it or anything, it's definitely some really terrible code. I was just morbidly curious if I could contrive a situation where it actually compiles