# Allow conditional inclusion of elements in array/dictionary literals?

**URL:** <https://forums.swift.org/t/allow-conditional-inclusion-of-elements-in-array-dictionary-literals/16171>\
**Category:** Pitches\
**Created:** [September 14, 2018, 4:38pm UTC](https://forums.swift.org/t/allow-conditional-inclusion-of-elements-in-array-dictionary-literals/16171 "2018-09-14T16:38:45Z")\
**Posts on this page:** 1\
**Showing post:** 38

<div class="post-metadata">

**Author:** ![jrose](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/jrose/32/408_2.png) [@jrose](https://forums.swift.org/u/jrose)\
**Post date:** [November 27, 2018, 4:43pm UTC](https://forums.swift.org/t/allow-conditional-inclusion-of-elements-in-array-dictionary-literals/16171/38 "2018-11-27T16:43:49Z")

</div>

> [@SDGGiesbrecht](#):
>
> Are the module stability plans to measure things in a cross‐platform way? Or will they produce different results on macOS vs Linux if public symbols are enclosed by `#if os(macOS)` or `#if canImport(ObjectiveC)` ?

We're getting off track here, but no, there will not be one interface that works across platforms. That wouldn't be possible for a generated interface, since the compiler can't typecheck anything that's in a different `#if` branch even if it can parse it. See [Plan for module stability](https://forums.swift.org/t/plan-for-module-stability/14551) for all the details.

---

_[View the full topic](https://forums.swift.org/t/allow-conditional-inclusion-of-elements-in-array-dictionary-literals/16171)._
