# SE-0362: Piecemeal adoption of future language improvements

**URL:** <https://forums.swift.org/t/se-0362-piecemeal-adoption-of-future-language-improvements/58384>\
**Category:** Proposal Reviews\
**Created:** [June 22, 2022, 8:23pm UTC](https://forums.swift.org/t/se-0362-piecemeal-adoption-of-future-language-improvements/58384 "2022-06-22T20:23:41Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![benrimmington](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/benrimmington/32/695_2.png) [@benrimmington](https://forums.swift.org/u/benrimmington)\
**Post date:** [June 23, 2022, 1:16am UTC](https://forums.swift.org/t/se-0362-piecemeal-adoption-of-future-language-improvements/58384/9 "2022-06-23T01:16:33Z")

</div>

> SwiftPM targets should be able to specify the future language features they require. Extend the `target` part of the manifest to take a set of future features as strings, e.g.:
> 
> ```swift
> .target(name: "myPackage",
> futureFeatures: ["ConciseMagicFile", "ExistentialAny"])
> 
> ```

Alternatively, should there be methods on [`SwiftSetting`](https://github.com/apple/swift-package-manager/blob/release/5.7/Documentation/PackageDescription.md#swiftsetting), with optional condition parameters?

```swift
extension SwiftSetting {

  public static func enableFutureFeature(
    _ name: String,
    _ condition: BuildSettingCondition? = nil
  ) -> SwiftSetting

  public static func enableExperimentalFeature(
    _ name: String,
    _ condition: BuildSettingCondition? = nil
  ) -> SwiftSetting
}

```

Contrived example:

```swift
.target(
  name: "MyTarget",
  swiftSettings: [
    .define("FLAG_ONE"),
    .define("FLAG_TWO"),
    .enableFutureFeature("BareSlashRegexLiterals"),
    .enableFutureFeature("ForwardTrailingClosures"),
    .enableFutureFeature("ConciseMagicFile", .when(platforms: [.macOS])),
    .enableFutureFeature("ExistentialAny", .when(configuration: .debug)),
  ]
)

```

---

_[View the full topic](https://forums.swift.org/t/se-0362-piecemeal-adoption-of-future-language-improvements/58384)._
