4 ms·
TypeScript 4.7
- nikolay 4y agoTypeScript used to be a beautiful language... until it added #private. Not sure why they keep adding directives in comments as well!
- amitport 4y ago#private is JavaScript...
- nikolay 4y agoYou are right [0]! I haven't really used any of these in the past years. Whoever came up with that should be banned from language design for life! Every language becomes Java given sufficient time - just like every data format becomes XML. [0] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- amitport 4y agoYou seem to have a general problem with the object oriented approach. As JavaScript is a general purpose + general audience language it tries to have minimal support for common paradigms (both fp and oo). That's fine IMO. Private props are fine. They are easy enough to learn and do not really get in your way in JS.
- nikolay 4y agoNot really - I've done OOP before it was cool (yeah, I'm old). But to use "#" for private properties - it's beyond fugly and not semantical [0]. [0]: https://en.wikipedia.org/wiki/Number_sign https://en.wikipedia.org/wiki/Number_sign
- ProfXponent 4y agoI enjoy working with typescript as an alternative to JS. Recently was working on Deno project and not having to worry about esm vs commonjs was so so nice.
- NetOpWibby 4y agoJust used Deno for a blog[0] and am using Deno for another project. It’s great. [0]: https://github.com/neuenet/blog https://github.com/neuenet/blog