Jennifer is a lesbian. Her wife, now husband, who she’s proudly supportive of, is FtM, with 3 previous children that Jennifer adopted. Jennifer has never had penetrative sex with a man.
It's not. The default sorter does that, because that way it can sort pretty much anything without breaking at runtime. You can overwrite it easily, though. For the example above you could simply do it like this:
Except strict equality, that's a JavaScript only problem. Imagine thinking "0" should be falsy in comparison due to string literal evaluation, but truthy with logical not applied based on non-empty string. Thus !"0"=="0" is true. They couldn't just throw away == and start over nooooo let's add === . Utter madness
Browser compatibility. Design flaws can't easily be fixed like how other languages can just switch to a new major version and introduce breaking changes. ES must keep backwards compatibility so has had to do more additive changes than replacing behavior altogether so that older web pages pages don't break.
Strict vs loose equality has gotten me so many times, but I can sort of see why they did it. The problem you mention with integers 0 & 1 is a major annoyance though. Like it is fairly common to check whether a variable is populated by using if (variable) {} - if the variable happens to be an integer, and that integer happens to be 0, loose quality will reflect that as false.
But on the other side, there have been plenty of occasions where I'm expecting a boolean to come from somewhere and instead the data is passed as a text string. "true" == true but "true" !== true
Lua does intrinsic evaluation of strings that i'd argue is not nearly as crazy. I get the value of it since half of interpreted languages it just churning through strings. But I also don't recommend any large codebase ever use JS's == or string coercion because it can go against expectations. This graph argues in JS's favor but comparison is a little more crazy https://algassert.com/visualization/2014/03/27/Better-JS-Equality-Table.html
42 Comments
stevehobbes@lemmy.world · 244 pts · 3y
Jennifer is a lesbian. Her wife, now husband, who she’s proudly supportive of, is FtM, with 3 previous children that Jennifer adopted. Jennifer has never had penetrative sex with a man.
iAmTheTot@kbin.social · 132 pts · 3y
Found the senior dev
LazaroFilm@lemmy.world · 27 pts · 3y
… checks out.
unreachable@lemmy.my.id · 11 pts · 3y
SpicyKetchup@lemmy.world · -3 pts · 3y
This would make her not a lesbian after her husband transitioned.
morphballganon@lemmynsfw.com · 26 pts · 3y
Depends. Could be. A person transitioning doesn't necessitate their partner finding their new body attractive.
SingularEye@lemmy.blahaj.zone · 97 pts · 3y
artificial insemination; beard marriage, loves her husband platonically. I am a JS dev.
Kraivo@lemmy.world · 33 pts · 3y
Lesbian, in marriage with another lesbian and adopted 3 kids. Still virgin.
where_am_i@sh.itjust.works · 26 pts · 3y
Her partner is actually a woman, but dynamic type casts made her write "husband".
unreachable@lemmy.my.id · 14 pts · 3y
and by kids, she means their cats and/or dogs
amanaftermidnight@lemmy.world · 11 pts · 3y
Ah yes, the fursons and furdaughters.
colorado@programming.dev · 11 pts · 3y
We prefer the gender neutral fur baby in this household.
pastaq@lemmy.ml · 4 pts · 3y
That's ageist.
IGuessThisIsForNSFW@yiffit.net · 9 pts · 3y
I was thinking they were his kids from the previous marriage, though artificial insemination works just as well!
scottywh@lemmy.world · 1 pts · 3y
I've had a JavaScript certification for over a decade now and I think I hate you.
Comment105@lemm.ee · -7 pts · 3y
Java devs are prima mental gymnasticists, always able to make anything make sense.
Konlanx@feddit.de · 43 pts · 3y
JS !== Java
Try Javascript some day!
Try Javascript today!
Durotar@lemmy.ml · 14 pts · 3y
I'm not sure whether this is satire or not.
Konlanx@feddit.de · 24 pts · 3y
It's not. The default sorter does that, because that way it can sort pretty much anything without breaking at runtime. You can overwrite it easily, though. For the example above you could simply do it like this:
[3, 1, 10].sort((a, b) => a - b)Returns:
[1, 3, 10]newIdentity@sh.itjust.works · 5 pts · 3y
Holy shit that's actually true. I just tried it
sociablefish@programming.dev · 2 pts · 3y
who the fuck decided that not breaking at runtime was more important than making sense?
this js example of
[1, 3, 10].sort()vs[1, 3, 10].sort((a, b) => a - b)will be my go to example of why good defaults are importantsociablefish@programming.dev · 1 pts · 3y
who uses utf 16? people either use utf 8 (for files) or utf 32 (for string class O(1) random access)
Comment105@lemm.ee · 1 pts · 3y
I made the thing in the thing print "hello world" with C# once, is Javascript for me?
Beanie@programming.dev · 1 pts · 3y
True + true = 2. I've heard memes about Javascript, but jeez. It's really that bad?SouthernCanadian@sh.itjust.works · 1 pts · 3y
As a js dev, I will gymnastically take that as a compliment
Blamemeta@lemm.ee · 21 pts · 3y
Simple. Malformed data from.a bad actor. Always sanity check your shit.
Coreidan@lemmy.world · 16 pts · 3y
If you have that much difficulty with JavaScript then it’s likely you’ll suffer with any language.
MakeAvoy@programming.dev · 5 pts · 3y
Except strict equality, that's a JavaScript only problem. Imagine thinking
"0"should be falsy in comparison due to string literal evaluation, but truthy with logical not applied based on non-empty string. Thus!"0"=="0"is true. They couldn't just throw away==and start over nooooo let's add===. Utter madnesssoloner@lemmy.world · 4 pts · 3y
Browser compatibility. Design flaws can't easily be fixed like how other languages can just switch to a new major version and introduce breaking changes. ES must keep backwards compatibility so has had to do more additive changes than replacing behavior altogether so that older web pages pages don't break.
MyNameIsIgglePiggle@sh.itjust.works · 7 pts · 3y
Meanwhile google is about to break the internet with html drm
JonEFive@midwest.social · 1 pts · 3y
Strict vs loose equality has gotten me so many times, but I can sort of see why they did it. The problem you mention with integers 0 & 1 is a major annoyance though. Like it is fairly common to check whether a variable is populated by using if (variable) {} - if the variable happens to be an integer, and that integer happens to be 0, loose quality will reflect that as false.
But on the other side, there have been plenty of occasions where I'm expecting a boolean to come from somewhere and instead the data is passed as a text string. "true" == true but "true" !== true
MakeAvoy@programming.dev · 3 pts · 2y
Lua does intrinsic evaluation of strings that i'd argue is not nearly as crazy. I get the value of it since half of interpreted languages it just churning through strings. But I also don't recommend any large codebase ever use JS's == or string coercion because it can go against expectations. This graph argues in JS's favor but comparison is a little more crazy https://algassert.com/visualization/2014/03/27/Better-JS-Equality-Table.html
bappity@lemmy.world · 15 pts · 3y
NaN
Ddhuud@lemmy.world · 1 pts · 3y
!NaN
(Translation: I agree)
asdfasdfasdf@lemmy.world · 9 pts · 3y
Any senior developer who says that should instantly get a demotion to intern.
Moc@lemmy.world · 17 pts · 3y
asdfasdfasdf@lemmy.world · 1 pts · 3y
https://www.youtube.com/watch?v=TTjYjSEGHek
HarkMahlberg@kbin.social · 3 pts · 3y
Which part? Saying that it's simple, or making fun of saying that it's simple?
ImpossibleRubiksCube@programming.dev · 5 pts · 3y
HarkMahlberg@kbin.social · 1 pts · 3y
Haha, ok I didn't see which community this was posted in.
asdfasdfasdf@lemmy.world · 1 pts · 3y
Saying it's not confusing (and simple).
ImpossibleRubiksCube@programming.dev · 3 pts · 3y
Kerrigor@kbin.social · 7 pts · 3y
Forced to develop on Windows
CanadaPlus@lemmy.sdf.org · 1 pts · 3y
terminhell@lemmy.dbzer0.com · 6 pts · 3y
Hol' up
royal_starfish@lemmy.world · 5 pts · 3y
And I thought kotlin was crazy with whatever (modifier: Modifier = Modifier) means to make it happy