Skip to content

Comment on Access Control in Swiftparent

Comments

I think one of the problems with protected is it over emphasises inheritance over composition. Swift isn't only a object based language but a functional one too with functions/blocks/closures playing a big role and potentially needing just as close access to the objects they act on as subclasses might.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.