The Swift compiler is slow due to how types are inferred
danielchasehooper.com
The Swift compiler is slow due to how types are inferred
1–10 of 229 posts
Re: The Swift compiler is slow due to how types are inferred
#2Re: The Swift compiler is slow due to how types are inferred
#3And without this type system, swift is just Objective C in a prettier syntax, so Apple has to bite the bullet and bear with it.
Re: The Swift compiler is slow due to how types are inferred
#4They never will, since it's also one of Swift's greatest strengths. What they may, eventually, do is dedicate the resources to minimize the negative aspects of the system while documenting clear ways to mitigate the biggest issues. Unfortunately Apple's dev tools org is chronically under resourced, which means improvements to the inference system and its diagnostics come and go as engineers are allowed to work on it.…
This is very true, Apple sees compiler jobs as a cost center.
Re: The Swift compiler is slow due to how types are inferred
#5Re: The Swift compiler is slow due to how types are inferred
#6(I maintains s4nnc and a fork of PythonKit).
Re: The Swift compiler is slow due to how types are inferred
#7Re: The Swift compiler is slow due to how types are inferred
#8This is not a fixable flaw. Solving these constraints efficiently can definitely get you a Turing award, it's basically the SAT problem. And without this type system, swift is just Objective C in a prettier syntax, so Apple has to bite the bullet and bear with it.
I'm convinced operator overloading is an anti-feature. It serves two purposes:
1) to make a small set of math operations easier to read (not write), in the case where there are no mistakes and all readers perfectly understand the role of each operator; and,
2) to make library developers feel clever.
Operator-named functions are strictly worse than properly named functions for all other uses. Yes, yes, person reading this comment, I know you like them because they make you feel smart when you write them, and you're going to reply with that one time in university that you really needed to solve a linear algebra problem in C++ for some reason. But they really are terrible for everyone who has to use that code after you. They're just badly named functions, they're un-searchable, they make error messages unreadable, and they are the cause the naming conflict that is at the root of the linked blog post. It's time to ditch operator overloading.
[1] Or because they look like the same symbol used in some entirely other context, god, please strike down everyone who has ever written an operator-/ to combine filesystem paths.
Re: The Swift compiler is slow due to how types are inferred
#9They never will, since it's also one of Swift's greatest strengths. What they may, eventually, do is dedicate the resources to minimize the negative aspects of the system while documenting clear ways to mitigate the biggest issues. Unfortunately Apple's dev tools org is chronically under resourced, which means improvements to the inference system and its diagnostics come and go as engineers are allowed to work on it.…
I think you're painting with too heavy a brush. Apple clearly is dedicating resources to long-tail issues. We just saw numerous examples two days ago at WWDC24.