Hacker News new | ask | show | jobs
by nielsbot 1882 days ago
If they allowed a bit more dynamism they could make protocols using Self existential too, right?

I know Swift is all about “as static is possible”, but maybe some explicit “dynamic” notation when you want to use Self-using protocols as a type could work.

1 comments

That what this proposal should cover. AFAIK there have never been an intention to limit existential for the sake of making the language more static; rather, it was born out of technical limitations of Swift compiler in the past.

To dissuade people from using existentials by default, the ongoing discussion focuses on requiring 'any' keyword in an existential type declaration.