-
Notifications
You must be signed in to change notification settings - Fork 30.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nodejs modules, why make bind such a hassle? #42490
Comments
@andrewhodel I’m confused, what do you mean by “core module system”? Could you maybe provide code that you’d like to be able to write and what error / unexpected behavior you get? |
This comment was marked as spam.
This comment was marked as spam.
Class is a language construct (it’s part of JavaScript, or ECMAScript if you prefer), not a Node.JS thing. Node.js doesn't have control over JavaScript the language, we build on top of it. If the ask is “can you remove class from the language?”, there’s nothing that can done on our side, you’d need to address the TC39 committee. I’m not sure I understand what Closing as it’s not actionable for us, feel free to ask more questions if I’ve misunderstood your request. |
This comment was marked as spam.
This comment was marked as spam.
There are two module systems that Node.js supports:
CJS was invented long ago because there was no module system in JavaScript. It's the "classic" syntax that uses Classes is not a different module system though, you may have been misinformed. It's a language construct that you don't have to use if you don't like it.
To contribute to the ECMAScript specification, see https://github.com/tc39/ecma262/blob/HEAD/CONTRIBUTING.md. |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
What makes you think that? AFAIK that's not correct, you never have to use classes in your code if you don't want to.
I suppose you could read through https://github.com/tc39/notes/tree/main/meetings. |
This comment was marked as spam.
This comment was marked as spam.
It's not what I meant, both ESM and CJS are supported by Node.js, you can use either, and still don't have to use a class if you don't want to.
Can you point to where it says that in Node.js docs? There's always room for improvements, hopefully we can work out a way of phrasing that in a less confusing way.
I'd like to point out that I'm working for free to help you, written communication is hard (especially for me as I'm not an English native speaker, I don't know about you), please assume I'm trying to help you in good faith, and I simply have trouble understand what you mean because I lack context. |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
What I mean by free is I don’t get any kind of retribution for answering to your question: when I’m bored on the internet, I go to the Node.js issue tracker to see if I can help somebody.
Be the change you want to see in the world: if you think the docs can be improved, you should feel free to submit a PR. I’ve opened #42491 to add the info regarding web compatibility, but if you think it needs more, please go ahead and open a PR.
The screenshot didn’t make it, I’m afraid GitHub is filtering it out.
Naming things is hard, but the name was decided before ESM was even an idea, so there was no way to know at the time that it could be of concern. It’s not deprecated because not everyone is interested in web-compatibility and some people simply prefer the syntax for some reason. |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
@andrewhodel I think we got off on the wrong foot. You may not realize but the way you phrased your messages comes across as incredibly disrespectful to the project volunteers helping you with your question. You may use the issue tracker respectfully and with accordance with how we conduct ourselves in the repo or not at all. Antoine (who is in fact volunteering his time here) has been doing nothing but trying to help you with your questions. Not only that but he went ahead and tried to improve things (e.g. #42491 ) based on your feedback. Please self moderate (edit) your comments to comply with our code of conduct. In particular:
It seems like you care about the project enough to open this issue and interact with it - that's great. Let's try to focus on constructive meaningful discussion of how to improve the docs. |
Actually I see there is history and it seems like there is a pattern of unwillingness to learn and engage constructively. I am going to go ahead and block you from the GitHub org. If you truly understand what you did wrong and want to make amends - you may contact the moderation team to discuss. |
Version
latest
Platform
Subsystem
module
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
You would expect the core module system not to exist.
What do you see instead?
It exists.
Additional information
Can you please clean this?
The text was updated successfully, but these errors were encountered: