Depends on the object what happens when they are moved from. Some objects are put into a valid moved from state (usually depends on if doing so is free or required anyway. For example to satisfy the invariant of the moved to unique pointer the moved from pointer needs to be set to nullptr in order to prevent the moved tos unique pointer being deleted from underneath it)
Traister101
Yo whatup
- 0 Posts
- 174 Comments
Please, I don’t want Okay Buddy Hololive brain rot on lemmy
Because it sounds like English words which is “cool”
Eyy I just watched Red Ranger, extremely enjoyable for how stupid it is. I bet I’d have loved power rangers if I watched it as a kid
Traister101@lemmy.todayto News@lemmy.world•‘Harrowing': Video shows Worcester police hold girl's face on ground during ICE operation51·2 months agoSince there’s been some good replies to this I shall now add my oh so very important reply to the pile.
Water isn’t actually wet, water wets things. Is a cup filled with water wet? No, the cup is dry and contains water. Are freshly washed dishes wet? Yeah, they have some water on them that hasn’t dried off yet.
“Is water wet”, “Is (breakfast) cereal a soup” and “Are hotdogs a sandwich” are some of my favorite stupid nonsense arguments to have. It’s entirely pointless but there is an actual right answer going by the definitions
I can’t judge but wow. Impressive
You cannot have a string argument, arguments and variables in JS don’t have a type. All you have in JS is objects. Actual functions, like full on
function foo(){}
are still objects, like you can actually store data on the things.
JavaScript doesn’t have typed parameters or variables. The function expects a string and does things in the function body which converts the object into a string. JS shares this behavior with all dynamically typed languages and it’s extremely useful in some contexts and extremely frustrating in others. It’s down to what it’s being used for. Dynamic languages make excellent scripting languages, see Python really just being a souped up shell lang
It’s not a string argument though, it’s JS. You can argue it’s expected to be a string but like the rest of JS all you can know from the signature alone is that it takes an object. Hopefully your little ducky quacks the right way!
Traister101@lemmy.todayto News@lemmy.world•Top virologists sound the alarm on bird flu and plead with world leaders to prepare for another pandemic19·2 months agoWe don’t “improve” diseases to make them deadilier and then just release them. The point of gain of function research essentially boils down to “How quickly can this disease become a serious issue and what do we expect that to look like?” with covid, thanks to gain of function research we knew it would quickly mutate and decrease in severity and we could significantly reduce harm by slowing the spread until it got to the point it’s at today.
Even Java has streams and stuff. Course Java so it’s kind of weird (iterators are mutable and internally iterate the collection/whatever lazily) streams are lazy and only go through all the operations, mapping, filtering ect when you collect the elements somehow (like rust). JS is wild lol
Traister101@lemmy.todayto News@lemmy.world•About 4-in-10 Americans say Trump is a ‘terrible’ president amid sinking approval: Survey9·2 months agoHonestly, as a sane person yes I do like honest Nazis more than lying Nazis. But do you know what I like more than honest Nazis? People who aren’t a Nazi, I like those way the fuck more than honest Nazis which apparently puts us in the minority in this shit hole of a county
Traister101@lemmy.todayto Programming@programming.dev•Vibe Coding is not an excuse for low-quality work9·3 months agoWhat ramdon ass language could they possibly be pulling out of their ass for you to he completely unable to write a for loop? I’ve yet to see a for loop, or really any sort of loop that doesn’t look pretty much exactly like the standard C style for loop
for(int x = 0; x < z; x++) { }
If you have a C style language with iterator for loops like C++, Java and friends you almost certainly have this syntax
for(int x : numbers) { }
Python has exclusively iterator for loops with this syntax
for x in range(z)
The only real difference is that instead of a colon
:
you use thein
token.At best I can see the need for a quick refresh on what the exact syntax is but if your a senior any languages you actually use should have a template for junk like this. I don’t think I’ve manually written a loop in ages, I just type out
iter
for an iterator for loop or when I rarely need an indexfori
and the rest gets stamped out for me.If your being tested on random languages you can simply just not be familiar with a language. I haven’t touched Zig once but I’d totally be down to learn it. Everybody whos got a couple languages under their belt knows how easy it is to pick up new ones.
There is also that sure but biologically people want to have kids, the extreme cost of living experienced by many prevents them from having kids
I’m sorry you incorrectly believe conservatives are a political party
At no point did I say Republicans
If we stop electing conservatives yes
Philanthropy is ineffective, that’s our current system and it’s not working
Bro that’s crazy has it crossed your mind that I don’t want to be rich? Put me in that position and I’d be paying for ads and shit to get the government to tax people like me more.
Your not gonna catch me on any of that “Oh so you think wealthy people shouldn’t exist” bs either btw. In a vacuum I think people should be able to make a lot of money from stuff they do but billionaires shouldn’t exist full stop. The amount of good you can do with merely one billion dollars is genuinely kind of inconceivable and we have multiple multi-billionaires, and not anywhere close to enough good being done by them. They simply shouldn’t exist. They’ll be just as happy being multimillionaires though I’d quite like taxes to dramatically ramp up once your in the 10 millions, even that is far above where middle class is meant to be.
Douno off the top of my head. To take a wild guess they might just wrap a file handle and give it s nice api? If that’s what they do then moving from the file zeros out he handle for basically the same reason smart pointers set their internal pointer to nullptr, so they don’t delete it (or close the file in this case) underneath the new object.