HackerTrans
TopNewTrendsCommentsPastAskShowJobs

dmarchuk

no profile record

comments

dmarchuk
·4 năm trước·discuss
Although I do understand the reasoning in the article, I completely agree with you.

Switching between Python and TypeScript/JavaScript all the time, using ‘#’ to define private field feels weird and I personally prefer more explicit way of writing code. Plus AFAIK the ‘private someField’ is common in other languages (Java, Scala,…).
dmarchuk
·4 năm trước·discuss
I've never had any issues with enums, namespaces or private keywords (can't speak for decorators as I haven't used them yet). Although I do understand the reasoning for using the '#somePrivateField' rather than 'private somePrivateField'.

But features like enums are part of the reason why we even have tools like TypeScript, because JavaScript lacks these features.