[swift-evolution] [Pitch] Rename Mirror

Dmitri Gribenko gribozavr at gmail.com
Thu Jul 21 17:34:41 CDT 2016


On Thu, Jul 21, 2016 at 3:25 PM, Anton Zhilin via swift-evolution
<swift-evolution at swift.org> wrote:
> https://github.com/Anton3/swift-evolution/blob/master/proposals/NNNN-rename-mirror.md
>
> Rename Mirror
>
> Proposal: SE-NNNN
> Author: Anton Zhilin, Adrian Zubarev
> Status: Awaiting review
> Review manager: TBD
>
> Introduction
>
> Rename Mirror to DebugRepresentation and CustomReflectable to
> CustomDebugRepresentable.
>
> Motivation
>
> Name of Mirror does not reflect (no pun) what it is intended to do, i.e.
> providing full featured reflection, which we want to see in Swift 4. Other
> than that, it is only intended to serve for debugging purposes, e.g.
> building trees for selected objects. Some evidence to that:
>
> Mirror.DisplayStyle contains optional and set as special cases, but does not
> contain function
> Mirror collects all information possible at initialization, while for true
> reflection we want laziness
> Mirror allows customization. For example, Array<T> is represented with a
> field for each of its elements. Do we want this for “true” reflection we
> want to add in the future?

Why can't we add these features to Mirror in future?

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