Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is this really new though? MVVM .NET apps similarly use getters & setters in this manner, except with XAML.


I've never seen .NET code that has magic properties hiding expensive operations, though my .NET experience is admittedly limited. Is that idiomatic?


Maybe so; it's pretty normal to expect a property setter to perform additional operations, as it's necessary for making data binding more manageable among other things. But using Go to Definition takes me directly to the getter/setter, so imo it's not exactly hidden.

I think it becomes problematic (or more magical) when these network/database/expensive calls are made willy nilly throughout an application, without a dedicated class or layer to aggregate these kinds of operations. If you have things architected correctly, it's not a big deal to trace these kinds of things throughout your app.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: