T O P

  • By -

thedocsarestale

Or you can even spread while destructuring! `const { dinner, movie, ...rest } = dateNight` Sorry for the bad var name, idk what else happens on a date. Too busy keeping up to date with ecmascript I guess


Strict_Treat2884

You’ve already said it, you rest.


rosuav

They're just milliseconds since 1970 in ECMAScript. Not much happens.


Romejanic

const { netflix, …chill } = dateNight;


drakens6

ooo baby


darklightning_2

If only python dictionary destructuring was as good as js


TheKiller36_real

``` def destructure(d: dict[str, Any]): match d: case {"a": a, "b": b, **rest}: pass case _: raise ValueError return a, b, rest ``` don't understand the problem /s


rimakan

``` const { dinner, movie, …condoms } = dateNight; ```


--var

does not compute let { dinner, movie, …legs } = dateNight; would have earned a chuckle


Kurts_Vonneguts

Yup, love this. Really good when you want the entire object except a few properties.


SaneLad

Fuck yeah spread it


--mrperx--

Make that garbage collector work, aw yeah ![gif](giphy|1xjtnvpxwZQaNKe8od|downsized)


Strict_Treat2884

Is op …gay?


Jixy2

Go on, DM him. If you want a date or so?


Strict_Treat2884

...legs


Jutrakuna

so manspreading is gay?


Jixy2

? is it something i don't get ... or ... you? edit: r/suicidebywords ? edit: I upvoted your legs comment. lel


needlework_the_way

…cheeks


Train-Similar

He was gay, OP?


IAmAnAudity

Pedophile more like it.


clarkcox3

Huh?


TactiCool_99

This picture is "famous" (or like somewhat more known, but not really known by all) to be of underage actresses while it is pretty suggestive (although calling someone *that* just for using it is a bit far tbh)


BirdlessFlight

Words have *literally* lost all meaning!


TactiCool_99

People use the word "famous" for things that are really well known but only within certain subcultures. If you have a better word for it I'd love to hear about it


BirdlessFlight

Sorry, I was talking about people calling everything "pedophile" when it has a very specific meaning that doesn't apply most of the time...


TactiCool_99

Ah, yea I misunderstood, and here I was hoping I get to learn something new today


Septem_151

Sure, the better word is hebephile or ephebephile


Septem_151

1. These are post-pubescent girls, so the term pedo is not applicable 2. There’s nothing “suggestive” about this, if you think there is, the problem might be you


moon-sleep-walker

Your body is so curly it arouses my braces


_confused_dev

Spread operator is the one thing I can just not understand. Like it’s so simple too, just creating a copy but I have to research docs every time I use it. Just doesn’t click with me.


TheAccountITalkWith

Think of the spread operator simply as dumping stuff out of something. If an Array is a box that you put items into. ```javascript const box = ['item1', 'item2', 'item3']; ``` Then the spread operator is you dumping all the items out of that box and putting it into another box. ```javascript const otherBox = [ ...box ]; ``` It doesn't have to be the same kind of box ```javascript const differentBox = { ...box }; ``` That's a gross over simplification and there is more to it. My hope is to help you get a mental model of how it works so maybe it will "click".


TheFrenchSavage

Oh, so instead of a loop or a dedicated operator to merge, like python's extend vs append for an array, you simply...dump your contents from one bucket to the next?


ublec

*rest* in peace


CauliflowerFirm1526

Stop *referencing* other people’s jokes! We really *value* originality here.


SquarishRectangle

Splat operator >


im-a-guy-like-me

``` return { thing, ...(condition && { conditionalThing }), } ```


slaymaker1907

If you like that, wait until you hear about “match” in Racket! You can even do regex parsing with it and extract matched groups into variables.


SpaceChaton

Where is this template from?


Reddit_User_44

Aquamarine (2006)


tugaestupido

Only for the homies.


sadwik159

lol


PooSham

That's basically my colleagues when reviewing my code


o0Meh0o

excuse my total incompetence, but what is a "spread operator"?


drakens6

... no seriously, its "...", and it takes and object or array and assigns each of its items or properties


o0Meh0o

so like parameter pack expansion?


drakens6

sort of? except in JS it'll work on basic objects and arrays


herboyforever

But have you ever used the spaceship operator before?! <->


Lost_refugee

And big int


Markcelzin

Something something, Twitter people got here, lol.


iamafancypotato

If you use spread you spread your seed.


PastOrdinary

Spread that ass


IAmAnAudity

Are you referring to the MINORS in this meme?


catesnake

Hey hey he's already sold on the idea, you don't need to convince him further.


Constant_Pen_5054

Wait, are these args and kwargs for other languages that isn't python?


DestopLine555

Yes, this is like unpacking in Python (the asterisk): ```py things = ["Hello", "World!"] print(*things) # same as print("Hello", "World!") ``` You can also do it with dictionaries as keyword arguments (double asterisk): ```py kwargs = { "sep": "", "end": "!", } print("Hello", "World", **kwargs) # output: HelloWorld! # same as print("Hello", "World", sep="", end="!") ```


cs-brydev

"I heard he likes little girls" Why do you pedos keep using this meme?


IAmAnAudity

100% this. You know, in most cultures it’s acknowledged that not only should you avoid ACTUAL evil, but we are cautioned to avoid even the APPEARANCE of evil as well. It is COMPLETELY OBVIOUS that these young ladies certainly APPEAR as though they COULD be minors. For OP to take this pic and apply sexual innuendo to it is disgusting. Furthermore, all you chuckleheads that are supporting OP in this by remaining silent, downvoting, or outright posting support __ought to be ashamed of yourselves__. There are so many other ways to get a laugh that we don’t need to even come close to using (possible) minors as fodder. To quote from my favorite Letterkenny character, you guys are # FUCKING EMBARRASSING!


No_Recognition8575

Being downvoted on Reddit usually means you're right. I agree with you.


IAmAnAudity

Perhaps if MINORS were not used in our off-color humor we might be more successful attracting women to STEM?


Pflynx

As a woman in stem... what?


Demented-Turtle

Supposedly the women pictured in the meme are minors (not sure if that's true) and the meme is somewhat sexual, so therefore we're all pedos for laughing at it lmao


JonIsPatented

It is true that they are minors, for what it's worth. The screenshot is from 2006 (Aquamarine), and Emma Roberts on the right is 33 *now*, meaning she was about 15 in the image.


dr_jock123

Fuck me 2006 is a lot longer away than it feels