[swift-evolution] [Discussion] Type hierarchy translation consistency

Dmitri Gribenko gribozavr at gmail.com
Sun Jun 12 05:34:19 CDT 2016


On Sun, Jun 12, 2016 at 3:33 AM, Adrian Zubarev via swift-evolution
<swift-evolution at swift.org> wrote:
> Just looked up the current implementation of this:
>
> extension String {
>   /// The index type for subscripting a string.
>   public typealias Index = CharacterView.Index
>
>   /// A type used to represent the number of steps between two
> `String.Index`
>   /// values, where one value is reachable from the other.
>   ///
>   /// In Swift, *reachability* refers to the ability to produce one value
> from
>   /// the other through zero or more applications of `index(after:)`.
>   public typealias IndexDistance = CharacterView.IndexDistance
>
> So the whole thing is somehow a wrong translation I’d guess.
>
> Should I file a bug?

Yes, please!

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/


More information about the swift-evolution mailing list