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

Yes. If nothing else, the calculation of that immutable data may be costly enough to motivate not calculating it multiple times. Hence you want to treat it as state. But that doesn't mean you want to expose it to the user of the class which may have a nice simple interface of cheap operations after the init is done.


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

Search: