[swift-evolution] [Review] SE-0023 API Design Guidelines
Dave Abrahams
dabrahams at apple.com
Tue Jan 26 14:37:59 CST 2016
on Mon Jan 25 2016, Radosław Pietruszewski <swift-evolution at swift.org> wrote:
> _Can we_ say that objectively, though?
>
> I would agree that
>
>> items.insert(12, atIndex: 2)
>
> reads more _like an English_ sentence than without the “at”. But I
> would hold back from saying “reads more naturally” / “more fluidly”,
> because it suggests to me that it’s inherently better. And I’m not
> sure I agree.
>
> I think there’s an agreement that making Swift sound like English is a
> non-goal. In fact, trying to do so is often harmful as we end up
> putting unnecessary words, like “with”, “and”, “by”, etc. (I’m not
> saying they’re always unnecessary; they often help convey the
> semantics or intent, or are needed for the method name to make
> sense. But too often they’re just glue words used to make code sound
> like English without any actual readability benefits, and merely
> adding noise.)
Beautifully said!
--
-Dave
More information about the swift-evolution
mailing list