Lazy evaluation. Why give it a fucked up name when there is already a correct term for it?
It's when they introduce a feature to a JS framework and give it a fancy name, then talk about it like it's the essential part you've got to understand only that it's some kind of basic concept you already watched several times.
Something to be aware of is that short circuiting is specific to conditional evaluation, while lazy evaluation is a general strategy for deferring expression evaluation until needed. Lazy evaluation is the counterpart to eager or "strict" evaluation, which is how most languages behave.
Most languages (Haskell being a notable exception) use eager evaluation by default, though you can usually introduce laziness in some way, often by wrapping your expression in a function call so that it evaluation only happens at the time of calling. Laziness lets you do things like introduce infinite data structures by evaluating a function to determine the next element of a list so that you only take what you need instead of trying to compute the entire sequence.
So the person correcting you is partly right (short-circuit evaluation is a form of laziness), but also kind of wrong (lazy evaluation is a lot more). You were correct to call it short-circuit evaluation in this context and only got corrected because that guy was just trying to be an "I am very smart" pedantic jackass and failed at it.
Hey thanks for the info! That's about what I've learned as well (thought I didn't know the Haskell details!) but I've found it's not really worth arguing with people, especially online (as tempting as it can be).
I find that combating the toxicity on this sub (and this site at a whole, really) with some manners and positivity to be my way of being the change I want to see.
I understand and mostly agree, at least with regard to not getting into pointless arguments with people. However, ignoring or placating someone to avoid confrontation because they chose to wrap their wrongness in belligerent aggression can give the impression that they're right and you accepted the correction.
I dislike that because it leads to a spread of misinformation, so while I'll avoid prolonged arguments I'm still going to call out BS where I see it. If the person wants to have a civil discussion from there I'll go with it; if not I say my piece and move on because life's too short to waste on pointless fights.
-20
u/TigreDeLosLlanos Apr 23 '21
Lazy evaluation. Why give it a fucked up name when there is already a correct term for it?
It's when they introduce a feature to a JS framework and give it a fancy name, then talk about it like it's the essential part you've got to understand only that it's some kind of basic concept you already watched several times.