Hacker News new | ask | show | jobs
by solidr53 3286 days ago
Bad example, checkout mobx or core-decorators.

@computed get value() { return this.a + 1; } @readonly bar = 5;

1 comments

The use of decorators in Anguar 2/4 is also very well done, IMHO. They allow your class to focus on its business logic, rather than the minute details of how Angular expects it to interact with the rest of Angular.

There's a reason all the most common languages have them, concealing complexity is a way to reduce cognitive overload and therefore, bugs.