# How to disable implicit Foundation imports?

**URL:** <https://forums.swift.org/t/how-to-disable-implicit-foundation-imports/59678>\
**Category:** Using Swift\
**Tags:** foundation, packagemanager\
**Created:** [August 15, 2022, 7:16pm UTC](https://forums.swift.org/t/how-to-disable-implicit-foundation-imports/59678 "2022-08-15T19:16:49Z")\
**Posts on this page:** 1\
**Showing post:** 54

<div class="post-metadata">

**Author:** ![taylorswift](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/taylorswift/32/43413_2.png) [@taylorswift](https://forums.swift.org/u/taylorswift)\
**Post date:** [August 16, 2022, 7:17pm UTC](https://forums.swift.org/t/how-to-disable-implicit-foundation-imports/59678/54 "2022-08-16T19:17:02Z")

</div>

> [@Geordie\_J](#):
>
> Candidly, and at the sore risk of pushing the discussion in an unproductive direction (not at all my intention), but the reliance on `Foundation` for essentially very simple things like this (literally just a path string) makes my blood boil just a little bit.

this is not at all an unproductive direction, in fact i personally think it is a _very_ productive thing to talk about (at least as a library author) and the only reason it is not talked about more is because someone still has to write the smaller, more modular frameworks to replace Foundation, and we do not always have time to take a 3 week detour to write a pure swift library so more often than not we just go down the Foundation route because it is the path of least resistance.

the issues with Foundation are well known and if anything i think the things you have mentioned are only touching on the tip of the iceberg.

> [@Geordie\_J](#):
>
> For that reason, it really bugs me that Foundation takes so much room in Swift's collective consciousness, and I feel the community would be so much better off with more modular and "Swifty" alternatives. I gather the decision makers at Apple feel the same, at least to some degree, which is why there is a push for the numerous and ever-increasing number of open source SwiftPM packages that have been published over the last years.
> 
> What I'm trying to say is, in my humble opinion, the move away from Foundation as a legacy monolith can't happen quickly enough, and I would _greatly_ appreciate essential tools like Swift Package Manager taking a stance to avoid essentially forcing its adoption like this.

again i do not think anyone _disagrees_ with what you are saying but it is a very big task and “i hate Foundation” is necessary but not sufficient. in particular many of us pure swift library authors are not good at cocoapods or XCode so writing libraries that don’t import Foundation but only compile on amazon linux and only compile on this week’s nightly toolchain is not a step forward it is really just [more of the same](https://forums.swift.org/t/se-0346-and-library-evolution/56659/39) if we are being honest.

if we want to make progress it is important i think to focus less on “we need more foundationless libraries” because there actually are a lot more than people think but they don’t get adoption because going from linux to macOS/iOS/watchOS/tvOS is just as hard as the other way around and the ecosystem is still fragmented just in a different way.

---

_[View the full topic](https://forums.swift.org/t/how-to-disable-implicit-foundation-imports/59678)._
