Echo JS 0.11.0


timoxley comments

timoxley 31 days ago. link 2 points
more accurately, only the reference is immutable. Nothing special happens that changes how const works with primitives vs objects.
timoxley 58 days ago. link 3 points
Note the node event loop is not dissimilar to the event loop in the browser. There's a great talk explaining
the browser event loop, tasks, microtasks, etc and how they're  scheduled with CSS, Animations the DOM in this talk from Jake Archibald at 2018 JSConf Asia:
timoxley 331 days ago. link 3 points
Delayed for the right reasons. This is a healthy sign.
timoxley 341 days ago. link 6 points
Magic strings create an implicit dependency between components. Implicit dependencies can make understanding how a system interoperates and the relationship between components more difficult. Where does this action come from and who else cares about this? These two "save" actions have the same name, but are they actually the same? Magic strings used like this are kind of like globals.

Rather than using magic strings, exporting and consuming a constant from outside the file it's defined in requires creating an explicit and directional relationship between the definition & the consumer: `import { CONSTANT } from './place'`.

The boilerplate is undesirable but I think showing explicit, directional relationships between files via require/import is more valuable for the overall cohesiveness of the system than the few lines of code you save.

I agree with the article that when constants are defined and consumed in the one file, constants are perhaps overkill, though maybe there's benefit to maintaining the same pattern for both internally and externally consumed constants.

Also agree with the overall sentiment of the article, should definitely be questioning and evaluating the cost benefit of best practices for our specific use-cases rather than blindly cargo-culting the dogma.