General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
ThePrimeTime
comments
Comments by "" (@adambickford8720) on "10 javascript Changes You Missed in 2023 | Prime Reacts" video.
@CottidaeSEA you are essentially trading performance for correctness and predictability. This is a trend among almost all the major languages. It allows frameworks to use identity checks for equality which is quite a bit more performant in large graphs. In practice, you are very unlikely to see a meaningful performance gap.
2
"InJeCtIoN AtTaCk!1!1" vs "isn't that an injection attack via string interpolation?" Turns out it is not string interpolation, though it looks a lot like it. That first case makes you look like a fool, in the 2nd you've expressed a concern while leaving the door open to being wrong, learning and growing. Of course if you're proven right, you can still pull out deez nuts.
1
People are moving away from mutability in general to the point where frameworks expect/demand it.
1
@CottidaeSEA its a different paradigm with its own pros and cons. its not that people don't understand, they just don't agree on the value of the trade-offs. immutable code is easier to understand as you don't have to worry about state over time. you don't have to 'manage' state, so it reduces bugs. it's a big part of why functional programming is on the rise and these apis support that nicely. if performance is critical you might want to consider something like persistent structs, object pooling, mutable structs, etc. but if you don't have measurements and SLAs, the 'performance' claim isn't very convincing.
1
@CottidaeSEA that's just one PoV but there are many other ways to think about solving that problem with different constraints. For example, most front-end frameworks model state changing over time as either a `signal` or `observable`, which emits immutable values over time. The reason is because when you're in a highly concurrent environment mutability is a nightmare.
1