This is a pretty common way of shoehorning access control into languages that do support them natively.