Joe Pea
Joe Pea
I forgot about the comments. Now I'm doing ```js componentWillUnmount() { document.querySelector(`style[scope=${this.styleScopeName}]`).remove() for (const node of Array.from(document.head.childNodes)) { if ( node.nodeType === Node.COMMENT_NODE && node.data.includes(this.styleScopeName) ) { node.remove() } }...
To people who are coming into web/javascript and don't know the deep internals/mechanics of the language just wanting to write some business logic, this sort of issue, > `Cannot read...
> The word "private" should be a sufficient clue? You can't access private things. @ljharb I'm not trying to access private things: I am accessig a _public member_ that correctly...
Based on that proposal @pzuraq, then your example, ```js class Foo { // this.baz is called before it is fully initialized ❌ bar = this.baz(); @initializeBaz baz() { return 123;...
> pzuraq outlined why "methods go first". @pzuraq did not outline why methods go first. @pzuraq outlined what happens if, based on the currently-defined order, we put a method *after*...
> Have you seen any other language that has methods & fields & inheritance and uses source-based order for inter-mixing instance-fields and class-methods I haven't. I'm thinking about what best...
> if anything we'll be lucky it gets implemented in engines at all, let alone these sort of arm-chair language designer suggestions you're brainstorming at the last minute you may...
> This is a dupe of [#565](https://github.com/tc39/proposal-decorators/issues/565), no? @justinfagnani the OP here outlines a different issue than the other issues. However the overall theme is shared: ordering is inconsistent, unintuitive,...
Can anyone here please write a decorator that logs class members in the order they were defined? Maybe I missed something.
> I don't believe it's possible to determine that, nor should it be. Source order is supposed to be largely irrelevant - classes are declarative, not imperative. A better question...