<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><div style="direction: inherit;">2 concerns</div><div style="direction: inherit;"><br></div><div style="direction: inherit;">1) This introduces an ambiguity in qualified import syntax about whether identifiers after the dot are sub-modules or sub-structures.</div><div style="direction: inherit;"><br></div><div style="direction: inherit;">2) Rarely do you want to import a substructure without also importing the parent. Often, APIs designed like there were built with this kind of use-case in mind, so it doesn't make any sense to be able to talk about a part without the whole. Qualifying access to substructures is not tremendously burdensome and helps enforce modularity and readability in my opinion. This expansion would harm that.</div><br>~Robert Widmann</div><div><br>2016/09/29 1:07、Cao Jiannan via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> のメッセージ:<br><br></div><blockquote type="cite"><div>Now Swift 3 allow us import specific enum/struct from module, but it only allow us import top-level declaration.<div class=""><br class=""></div><div class="">For example:</div><div class=""><br class=""></div><div class="">in MyFoudnation framework:</div><div class=""><br class=""></div><div class=""><span style="color: rgb(4, 51, 255); font-family: 'Fira Code'; font-size: 11px; font-variant-ligatures: no-common-ligatures;" class="">public</span><span style="font-family: 'Fira Code'; font-size: 11px; font-variant-ligatures: no-common-ligatures;" class=""> </span><span style="color: rgb(4, 51, 255); font-family: 'Fira Code'; font-size: 11px; font-variant-ligatures: no-common-ligatures;" class="">struct</span><span style="font-family: 'Fira Code'; font-size: 11px; font-variant-ligatures: no-common-ligatures;" class=""> Time {</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Fira Code';" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff" class="">public</span><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff" class="">struct</span><span style="font-variant-ligatures: no-common-ligatures" class=""> DateOnly {}</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Fira Code';" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">}</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Fira Code';" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Fira Code';" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span style="font-family: Helvetica; font-size: 12px;" class="">in App target:</span></span></div><div style="margin: 0px; line-height: normal;" class="">I can only</div><div style="margin: 0px; line-height: normal;" class=""> </div><div style="margin: 0px; line-height: normal;" class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Fira Code';" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff" class="">import</span><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff" class="">struct</span><span style="font-variant-ligatures: no-common-ligatures" class=""> MyFoundation.Time</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Fira Code';" class=""><br class=""></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class="">But I cannot </span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span style="font-family: 'Fira Code'; font-size: 11px; font-variant-ligatures: no-common-ligatures; color: rgb(4, 51, 255);" class="">import</span><span style="font-family: 'Fira Code'; font-size: 11px; font-variant-ligatures: no-common-ligatures;" class=""> </span><span style="font-family: 'Fira Code'; font-size: 11px; font-variant-ligatures: no-common-ligatures; color: rgb(4, 51, 255);" class="">struct</span><span style="font-family: 'Fira Code'; font-size: 11px; font-variant-ligatures: no-common-ligatures;" class=""> MyFoundation.Time.DateOnly</span></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span style="font-family: 'Fira Code'; font-size: 11px; font-variant-ligatures: no-common-ligatures;" class=""><br class=""></span></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span style="font-family: 'Fira Code'; font-size: 11px; font-variant-ligatures: no-common-ligatures;" class=""><span style="font-family: Helvetica; font-size: 12px;" class="">So allow developer import nested types</span></span></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span style="font-family: 'Fira Code'; font-size: 11px; font-variant-ligatures: no-common-ligatures;" class=""><span style="font-family: Helvetica; font-size: 12px;" class=""><br class=""></span></span></span></div></div></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>swift-evolution mailing list</span><br><span><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br></div></blockquote></body></html>