Skip to content
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

Using ES6 features (eg classes) #157

Open
ConsciousCode opened this issue Oct 24, 2017 · 2 comments
Open

Using ES6 features (eg classes) #157

ConsciousCode opened this issue Oct 24, 2017 · 2 comments

Comments

@ConsciousCode
Copy link

Currently node-x11 is using old idioms for inheritance, which I think is unnecessary at this point. Node has long supported most of ES6, and the same applies to virtually every other browser (if portability is even a concern). Using these features will enhance code readability, reduce potential errors introduced through boilerplate, and eliminate the need for certain utilities like util.inherits. I also see a lot of comments questioning the speed of certain utility hacks, many of which have dedicated ES6 functions.

I'd be glad to make these changes myself, starting with the least intrusive feature, classes (which are indistinguishable from the old idioms), and going on with updating the content with ES6 idioms.

@sidorares
Copy link
Owner

Personally I don't see that very high on my priority list.
re code readability - I really want to reformat all code and add prettier + eslint as part of automatic code check / transformation ( see sidorares/dbus-native#172 for example of similar work )

Performance wise I think we can get huge benefit by switching from string based parser to binary Buffers ( it was created initially before Buffer existed at all in node back in 2010 )

@sidorares
Copy link
Owner

But in general happy to gradually move to new language features - it's safe to require 4.x as minimum node version, thanks for the offer @ConsciousCode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants