{"id":13518395,"url":"https://github.com/petsel/not-awesome-es6-classes","last_synced_at":"2026-02-03T21:10:35.016Z","repository":{"id":69426723,"uuid":"43733877","full_name":"petsel/not-awesome-es6-classes","owner":"petsel","description":"A curated list of resources on why ES6 (aka ES2015) classes are NOT awesome","archived":false,"fork":false,"pushed_at":"2015-10-06T06:51:39.000Z","size":98,"stargazers_count":86,"open_issues_count":0,"forks_count":58,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-19T14:34:53.127Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/petsel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-06T06:33:57.000Z","updated_at":"2024-05-06T18:01:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"a19a9171-7473-4044-b2a9-391d323344cd","html_url":"https://github.com/petsel/not-awesome-es6-classes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petsel%2Fnot-awesome-es6-classes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petsel%2Fnot-awesome-es6-classes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petsel%2Fnot-awesome-es6-classes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petsel%2Fnot-awesome-es6-classes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/petsel","download_url":"https://codeload.github.com/petsel/not-awesome-es6-classes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246372526,"owners_count":20766633,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T05:01:44.288Z","updated_at":"2026-02-03T21:10:34.927Z","avatar_url":"https://github.com/petsel.png","language":null,"funding_links":[],"categories":["Technical","Others"],"sub_categories":["awesome-*"],"readme":"# Not Awesome: ES6 Classes\n\nA curated list of resources on why ES6 (aka ES2015) classes are NOT awesome\n\nReverse-inspired by all of the awesome lists on GitHub, like [Awesome](https://github.com/sindresorhus/awesome), [Awesome Awesomeness](https://github.com/bayandin/awesome-awesomeness), [Awesome JavaScript](https://github.com/sorrycc/awesome-javascript), [Awesome React](https://github.com/enaqx/awesome-react), [Awesome Go](https://github.com/avelino/awesome-go), [Awesome Elm](https://github.com/isRuslan/awesome-elm), etc.\n\n## Table of Contents\n\n- [Introduction](#introduction)\n- [Too Long; Didn't Read](#tldr)\n- [Reading](#reading)\n- [Videos](#videos)\n- [Contribution Guidelines](#contribution-guidelines)\n- [License](#license)\n\n## Introduction\n\nWhile ES6 brings several useful and syntactically pleasing new features to JavaScript, there are many people in the JS community who feel that adding class syntax to the language was a mistake. I share this sentiment, but I have encountered quite a few programmers in the wild who don't agree or simply don't seem to understand why some of us have this opinion. So, I wanted to create an online reference where people could come to learn specifically about this issue and why they might not actually need class syntax in JavaScript.\n\n## TLDR\n\n- JavaScript is a class-free, object-oriented, \u0026 functional programming language. It eschews [classical inheritance](https://en.wikipedia.org/wiki/Class-based_programming) in favor of [prototypal inheritance](https://en.wikipedia.org/wiki/Prototype-based_programming).\n- Many believe prototypal inheritance to be more flexible and freeing than classical inheritance due to its less rigid nature.\n- The ES6 class syntax, constructors, the `new` keyword, etc. are ideas taken from the classical inheritance model to make programmers coming from languages like C++, Java, C#, etc. more comfortable and do not really belong in JavaScript.\n- While prototypal inheritance is very powerful in its own right, there is a growing movement among developers, both within and outside of the JS community (Ex: [Composition in Golang](https://talks.golang.org/2012/splash.article#TOC_15.)), to shift away from inheritance in favor of object composition. \n- ES6 class syntax is essentially syntactic sugar that will end up obfuscating the true nature of JavaScript and confusing the next generation of programmers learning it.\n- Instead of ES6 classes, you should consider factory functions, object composition, and/or prototypal inheritance via the use of prototypes, object literals, Object.create(), Object.assign(), etc. while avoiding constructors and the `new` keyword altogether.\n\n“If a feature is sometimes dangerous, and there is a better option, then always use the better option.” \n\n--Douglas Crockford\n\n## Reading\n\n- [Common Misconceptions About Inheritance in JavaScript](https://medium.com/javascript-scene/common-misconceptions-about-inheritance-in-javascript-d5d9bab29b0a)\n- [Composition over Inheritance](https://medium.com/humans-create-software/composition-over-inheritance-cb6f88070205)\n- [Delegation vs Inheritance in JavaScript](https://javascriptweblog.wordpress.com/2010/12/22/delegation-vs-inheritance-in-javascript)\n- [Factory functions in JavaScript](https://medium.com/humans-create-software/factory-functions-in-javascript-video-d38e49802555)\n- [How to Fix the ES6 `class` keyword](https://medium.com/javascript-scene/how-to-fix-the-es6-class-keyword-2d42bb3f4caf)\n- [Introducing the Stamp Specification -- Move Over, `class`: Composable Factory Functions Are Here](https://medium.com/javascript-scene/introducing-the-stamp-specification-77f8911c2fee)\n- [Javascript OO Without Constructors](http://tobyho.com/2012/10/21/javascript-OO-without-constructors/)\n- [The Two Pillars of JavaScript -- Part 1: How to Escape the 7th Circle of Hell](https://medium.com/javascript-scene/the-two-pillars-of-javascript-ee6f3281e7f3)\n- [Think twice about ES6 classes](http://christianalfoni.github.io/javascript/2015/01/01/think-twice-about-classes.html)\n\n## Videos\n\n- [Ashley Williams: If you wish to learn ES6/2015 from scratch, you must first invent the universe](https://www.youtube.com/watch?v=DN4yLZB1vUQ)\n- [Composition over inheritance](https://www.youtube.com/watch?v=wfMtDGfHWpA)\n- [Douglas Crockford: The Better Parts - JSConfUY 2014](https://www.youtube.com/watch?v=bo36MrBfTk4)\n- [Factory Functions in JavaScript](https://www.youtube.com/watch?v=ImwrezYhw4w)\n- [Fluent 2013 - Eric Elliott, \"Classical Inheritance is Obsolete: How to Think in Prototypal OO\"](https://www.youtube.com/watch?v=lKCCZTUx0sI)\n- [Nordic.js 2014 • Douglas Crockford - The Better Parts](https://www.youtube.com/watch?v=PSGEjv3Tqo0)\n- [Source Decoded 3: Javascript -- Prototypes, Prototypal Inheritance done right.](https://www.youtube.com/watch?v=Yvf_kUBZmXg)\n\n# Contribution Guidelines\n\nPlease, ensure your pull request adheres to the following guidelines:\n\n- Search previous suggestions before making a new one, as yours may be a duplicate.\n- Make an individual pull request for each suggestion.\n- Titles should be [capitalized](http://grammar.yourdictionary.com/capitalization/rules-for-capitalization-in-titles.html).\n- Use the following format: `[Content Title](content link)`\n- Choose corresponding section (Reading, Videos, etc.) for your suggestion. \n- New categories or improvements to the existing categorization are welcome. I would like to add a Tutorials/Examples section at some point. Feel free to get started on that if you have the time.\n- The pull request and commit should have clear and useful titles.\n- Each section's list, after your addition, should be sorted alphabetically.\n\n## License\n\n[![Creative Commons License](http://i.creativecommons.org/l/by/4.0/88x31.png)](http://creativecommons.org/licenses/by/4.0/)\n\nThis work is licensed under a [Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetsel%2Fnot-awesome-es6-classes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpetsel%2Fnot-awesome-es6-classes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetsel%2Fnot-awesome-es6-classes/lists"}