[swift-evolution] [pitch] rename 'guard' to 'ensure'

alessandro aresta performerstone at gmail.com
Wed Oct 26 03:11:35 CDT 2016


Ensure is more comprehensible, guard is for sure "always" been there in
older languages... could it be kind of aliased somehow? I tend to confuse
guard sometimes, despite many few decades of using it.

On Wed, Oct 26, 2016 at 2:52 AM, Chris Lattner via swift-evolution <
swift-evolution at swift.org> wrote:

>
> > On Oct 25, 2016, at 10:20 AM, Joe Groff via swift-evolution <
> swift-evolution at swift.org> wrote:
> >
> > At this point in Swift's evolution, source-breaking changes to the
> language require strong motivation. We can't really entertain superficial
> keyword changes like this without overwhelming evidence that the existing
> syntax is problematic in practice. `guard` has precedent in functional
> languages, for instance in Haskell where the `guard` function is
> idiomatically used as part of monadic `do`-notation computations, and has
> the same positive condition semantics in those languages.
>
> Right.  Jay, I’m sorry if you or others find the name “guard” to be
> confusing, but there are many Swift developers that like it.  I is almost
> inconceivable that we would change it at this point.
>
> -Chris
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
>



-- 
*Alessandro Alexander Stone Aresta*

senior development & consulting

*email  : performerstone at gmail.com <performerstone at gmail.com>*
*skype : alexanderstone2007*


*This  is  a  confidential   communication   intended   only  for  the
named addressee. *
* If you received this **communication **in **error, please notify
us  and return and delete it without  reading it. *

*This e-mail may not be *
*disclosed,  copied or distributed*
* in  **any form without the obtained permission in writing of  Alessandro
Aresta. *

*In  any case it  may not be altered or otherwise *

*changed.  *
* Whilst  Alessandro Aresta believes  that  the   information  is  correct
at  the date  of   the  e-mail,  no  warranty and *

*representation  is given to this effect and no responsibility can be
accepted by Alessandro Aresta.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20161026/50b039c5/attachment.html>


More information about the swift-evolution mailing list