After seeing a few large swift projects (2/3 man-year projects) completely collapse under compilation times, and yet see no hint of addressing those issues in swift evolution, i came to the idea that maybe there was something wrong in the way those projects were architectured / developped, and not with swift itself.
So my question:
- How big should a single modules be ? 10 average class/struct ? 100 ? 1000 ?
- How many modules is it ok for a big iOS app to have ? 10s ? 100s ? 1000s ? (i remember a time a few years ago when modules increased launch time for the app, so more than 10 was out of question)
Type inference :
- Am i supposed to write the types of every variable / closure ? like
let myA: A = myFuncCall()
- Am i supposed to write the types of constant expressions ? (i'm remember a bug of dictionaries with heterogeneous types taking minutes to type-infer)
- Should i consider compilation times before starting to use generics in my code ? Or should it not interfer ?
All those issues have been hitting me in the past with regards to compilation times, but i thought it was a temporary issue. It's been a few years now, and it still doesn't feel like a top priority...