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

I think what I really want is some sort of access control for references to an object.

Like the default is the compiler will throw a warning if you access a private field with a default reference.

So things like this works but the compiler bitches.

   printf("what hell is bar doing %i", foo.bar);  // throws a warning 'bar is private'
But you can have a reference that's all in for api functions.

And also a reference that will throw a warning for any attempt access fields. The idea being it's a pure handle.



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: