Evaluate ES6 classes
See original GitHub issueWhy is this ‘idiom’ of inheritance being introduced into the code:
PointLight.prototype = Object.assign( Object.create( Light.prototype ), {
Seriously? Function(nested Function(ParentPrototype) COMMA SHOTGUN BRACKET?
The faithful two line style still in, for example, the Materials classes are much clearer and cleaner. Assign the prototype and then set the constructor. The end. Please don’t ruin the library by catching JavaScript disease - the bizarre need to masturbate the way objects and inheritance are coded. One style throughout the library. No need to change it.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:13
- Comments:93 (56 by maintainers)
Top Results From Across the Web
Classes - JavaScript - MDN Web Docs
Classes are a template for creating objects. They encapsulate data with code to work on that data. Classes in JS are built on...
Read more >How ES6 classes really work and how to build your own
How ES6 classes really work and how to build your own · Object model · Prototypal inheritance · Internal slots · Old style...
Read more >15. Classes - Exploring JS
This section explains four approaches for managing private data for ES6 classes: Keeping private data in the environment of a class constructor; Marking...
Read more >Classes in ECMAScript 6 (final semantics) - 2ality
Class definitions are the only way to create derived constructors (enabling ES6-style subclassing that works for built-in constructors). Class ...
Read more >javascript - Using eval method to get class from string in Firefox
16 Runtime Semantics: Evaluation, under ClassDeclaration : class BindingIdentifier ClassTail which calls the section you referenced, and it shows Return ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Until browsers can execute natively TypeScript, I prefer to keep using JavaScript.
hehe 😄 And no problems…