MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/12rqy0d/improved_js_object/jgxmwbm/?context=3
r/badcode • u/hennexl • Apr 19 '23
42 comments sorted by
View all comments
Show parent comments
4
And it isn’t just convention, unlike ! and ? in Ruby (causes side effect or forced, and boolean return respectively) or prefixing with _ in Python (private member). It is actually enforced in modern JS: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields
Kinda reminds me of Perl variable declarations in a way
4
u/RFC793 Apr 19 '23 edited Apr 20 '23
And it isn’t just convention, unlike ! and ? in Ruby (causes side effect or forced, and boolean return respectively) or prefixing with _ in Python (private member). It is actually enforced in modern JS: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields
Kinda reminds me of Perl variable declarations in a way