You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some developers prefer not to constantly use this in classes, as classes in general can lead to larger files and complicate code splitting. They much prefer a functional approach. I believe it would be a good idea, considering memory and parallel processing, to examine the syntax available.
Suggestion: Make structs more like Rust, as many JavaScript tools are leaning towards Rust, taking into account proposals like JSSugar/JS0, where tooling becomes first-class. If type annotations become a reality, it would make sense to adopt Rust syntax for structs, traits (type annotations), and impl for implementation rather than extension.
This would eliminate the limitations surrounding multiple inheritance, which is still restricted to mixins and thus not safe for parallel processing. It also offers a good middle ground between classes and functions, facilitating code splitting. I don't believe it would be good idea to allow structs to be extended like classes if we looking for good memory management
I don’t want to derail the feature, but I have been thinking long-term about an additional proposal. It would be misguided to impose restrictions based on features or syntax that has already been implemented.
The text was updated successfully, but these errors were encountered:
The "type annotations" proposal is not adding types to the language, just new syntax for comments. The rest of the Rust stuff doesn't make sense unless the types actually have semantics, which they won't in JS.
Some developers prefer not to constantly use
this
in classes, as classes in general can lead to larger files and complicate code splitting. They much prefer a functional approach. I believe it would be a good idea, considering memory and parallel processing, to examine the syntax available.Suggestion: Make structs more like Rust, as many JavaScript tools are leaning towards Rust, taking into account proposals like JSSugar/JS0, where tooling becomes first-class. If type annotations become a reality, it would make sense to adopt Rust syntax for structs, traits (type annotations), and
impl
for implementation rather than extension.This would eliminate the limitations surrounding multiple inheritance, which is still restricted to mixins and thus not safe for parallel processing. It also offers a good middle ground between classes and functions, facilitating code splitting. I don't believe it would be good idea to allow structs to be extended like classes if we looking for good memory management
I don’t want to derail the feature, but I have been thinking long-term about an additional proposal. It would be misguided to impose restrictions based on features or syntax that has already been implemented.
The text was updated successfully, but these errors were encountered: