swift-evolution Digest, Vol 1, Issue 237


(Akiva Leffert) #1

I started off a thread about this a while back: https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151207/001455.html

Based on the feedback I got, it seemed like the design for a serious custom annotation system should wait until work starts on a macro system so that they can be designed to complement each other. IMO, neither the java nor python versions feel right for swift and we can do a lot better than just copying them so it’s worth spending the time to get it right.

Additionally, the property behaviors proposal currently on the table would cover some of the use cases for annotations, depending on where it lands. It seems plausible that we can make all these features work together in a nice way.

Maybe it’s worth setting up a wiki page or something for use cases of annotations to help inform a future design as well as the design of related features?

-Akiva Leffert

···

Message: 18
Date: Sat, 26 Dec 2015 10:03:35 +0000
From: JOSE MARIA GOMEZ CAMA <jm.gomez@ub.edu>
To: "swift-evolution@swift.org" <swift-evolution@swift.org>
Subject: [swift-evolution] Support for custom attributes
Message-ID: <331F173E-0A78-44CC-A1E8-E30538431E37@ub.edu>
Content-Type: text/plain; charset=utf-8

Dear all,

I am quite new to Swift, though I have made some small checks within Xcode, so I could have missed some feature in swift that provides a functionality similar to the want I am proposing.

I have been using my own annotations in Java or decorators in Python, and I would like to have an equivalent functionality in Swift. As far as I have seen, there are attributes that can provide a similar solution, but AFAIK you cannot create new ones. Would it be possible to add this feature in Swift.

       Thanks in advance,

               Jose M.

Aquest correu electrònic i els annexos poden contenir informació confidencial o protegida legalment i està adreçat exclusivament a la persona o entitat destinatària. Si no sou el destinatari final o la persona encarregada de rebre’l, no esteu autoritzat a llegir-lo, retenir-lo, modificar-lo, distribuir-lo, copiar-lo ni a revelar-ne el contingut. Si heu rebut aquest correu electrònic per error, us preguem que n’informeu al remitent i que elimineu del sistema el missatge i el material annex que pugui contenir. Gràcies per la vostra col·laboració.

Este correo electrónico y sus anexos pueden contener información confidencial o legalmente protegida y está exclusivamente dirigido a la persona o entidad destinataria. Si usted no es el destinatario final o la persona encargada de recibirlo, no está autorizado a leerlo, retenerlo, modificarlo, distribuirlo, copiarlo ni a revelar su contenido. Si ha recibido este mensaje electrónico por error, le rogamos que informe al remitente y elimine del sistema el mensaje y el material anexo que pueda contener. Gracias por su colaboración.

This email message and any documents attached to it may contain confidential or legally protected material and are intended solely for the use of the individual or organization to whom they are addressed. We remind you that if you are not the intended recipient of this email message or the person responsible for processing it, then you are not authorized to read, save, modify, send, copy or disclose any of its contents. If you have received this email message by mistake, we kindly ask you to inform the sender of this and to eliminate both the message and any attachments it carries from your account. Thank you for your collaboration.


(JOSE MARIA GOMEZ CAMA) #2

Well, it seems that we will have to wait for the reflection mechanism to be in place.

Best

···

El 26/12/2015, a las 20:25, Akiva Leffert <aleffert@gmail.com<mailto:aleffert@gmail.com>> escribió:

I started off a thread about this a while back: https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151207/001455.html

Based on the feedback I got, it seemed like the design for a serious custom annotation system should wait until work starts on a macro system so that they can be designed to complement each other. IMO, neither the java nor python versions feel right for swift and we can do a lot better than just copying them so it’s worth spending the time to get it right.

Additionally, the property behaviors proposal currently on the table would cover some of the use cases for annotations, depending on where it lands. It seems plausible that we can make all these features work together in a nice way.

Maybe it’s worth setting up a wiki page or something for use cases of annotations to help inform a future design as well as the design of related features?

-Akiva Leffert

Message: 18
Date: Sat, 26 Dec 2015 10:03:35 +0000
From: JOSE MARIA GOMEZ CAMA <jm.gomez@ub.edu<mailto:jm.gomez@ub.edu>>
To: "swift-evolution@swift.org<mailto:swift-evolution@swift.org>" <swift-evolution@swift.org<mailto:swift-evolution@swift.org>>
Subject: [swift-evolution] Support for custom attributes
Message-ID: <331F173E-0A78-44CC-A1E8-E30538431E37@ub.edu<mailto:331F173E-0A78-44CC-A1E8-E30538431E37@ub.edu>>
Content-Type: text/plain; charset=utf-8

Dear all,

I am quite new to Swift, though I have made some small checks within Xcode, so I could have missed some feature in swift that provides a functionality similar to the want I am proposing.

I have been using my own annotations in Java or decorators in Python, and I would like to have an equivalent functionality in Swift. As far as I have seen, there are attributes that can provide a similar solution, but AFAIK you cannot create new ones. Would it be possible to add this feature in Swift.

       Thanks in advance,

               Jose M.

Aquest correu electrònic i els annexos poden contenir informació confidencial o protegida legalment i està adreçat exclusivament a la persona o entitat destinatària. Si no sou el destinatari final o la persona encarregada de rebre’l, no esteu autoritzat a llegir-lo, retenir-lo, modificar-lo, distribuir-lo, copiar-lo ni a revelar-ne el contingut. Si heu rebut aquest correu electrònic per error, us preguem que n’informeu al remitent i que elimineu del sistema el missatge i el material annex que pugui contenir. Gràcies per la vostra col·laboració.

Este correo electrónico y sus anexos pueden contener información confidencial o legalmente protegida y está exclusivamente dirigido a la persona o entidad destinataria. Si usted no es el destinatario final o la persona encargada de recibirlo, no está autorizado a leerlo, retenerlo, modificarlo, distribuirlo, copiarlo ni a revelar su contenido. Si ha recibido este mensaje electrónico por error, le rogamos que informe al remitente y elimine del sistema el mensaje y el material anexo que pueda contener. Gracias por su colaboración.

This email message and any documents attached to it may contain confidential or legally protected material and are intended solely for the use of the individual or organization to whom they are addressed. We remind you that if you are not the intended recipient of this email message or the person responsible for processing it, then you are not authorized to read, save, modify, send, copy or disclose any of its contents. If you have received this email message by mistake, we kindly ask you to inform the sender of this and to eliminate both the message and any attachments it carries from your account. Thank you for your collaboration.


(Radosław Smogura) #3

I think that throwing out our effort is bed idea. Waiting for reflection system may cause that implementation of attributes will be impossible - both of those things should be done together!

Maybe it would be good to work on agile, iterative bases? What do you think about defining for MVP
- parsing minimised attribute declaration, enabled by command line feature switch
- producing some AST
- validate attribute tree

Later we can influence each other, and make corrections. It’s not waterfall to define everything upfront.

Best regards,
Radek

···

On 27 Dec 2015, at 19:59, JOSE MARIA GOMEZ CAMA <jm.gomez@ub.edu> wrote:

Well, it seems that we will have to wait for the reflection mechanism to be in place.

Best

El 26/12/2015, a las 20:25, Akiva Leffert <aleffert@gmail.com <mailto:aleffert@gmail.com>> escribió:

I started off a thread about this a while back: https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151207/001455.html

Based on the feedback I got, it seemed like the design for a serious custom annotation system should wait until work starts on a macro system so that they can be designed to complement each other. IMO, neither the java nor python versions feel right for swift and we can do a lot better than just copying them so it’s worth spending the time to get it right.

Additionally, the property behaviors proposal currently on the table would cover some of the use cases for annotations, depending on where it lands. It seems plausible that we can make all these features work together in a nice way.

Maybe it’s worth setting up a wiki page or something for use cases of annotations to help inform a future design as well as the design of related features?

-Akiva Leffert

Message: 18
Date: Sat, 26 Dec 2015 10:03:35 +0000
From: JOSE MARIA GOMEZ CAMA <jm.gomez@ub.edu <mailto:jm.gomez@ub.edu>>
To: "swift-evolution@swift.org <mailto:swift-evolution@swift.org>" <swift-evolution@swift.org <mailto:swift-evolution@swift.org>>
Subject: [swift-evolution] Support for custom attributes
Message-ID: <331F173E-0A78-44CC-A1E8-E30538431E37@ub.edu <mailto:331F173E-0A78-44CC-A1E8-E30538431E37@ub.edu>>
Content-Type: text/plain; charset=utf-8

Dear all,

I am quite new to Swift, though I have made some small checks within Xcode, so I could have missed some feature in swift that provides a functionality similar to the want I am proposing.

I have been using my own annotations in Java or decorators in Python, and I would like to have an equivalent functionality in Swift. As far as I have seen, there are attributes that can provide a similar solution, but AFAIK you cannot create new ones. Would it be possible to add this feature in Swift.

       Thanks in advance,

               Jose M.

Aquest correu electrònic i els annexos poden contenir informació confidencial o protegida legalment i està adreçat exclusivament a la persona o entitat destinatària. Si no sou el destinatari final o la persona encarregada de rebre’l, no esteu autoritzat a llegir-lo, retenir-lo, modificar-lo, distribuir-lo, copiar-lo ni a revelar-ne el contingut. Si heu rebut aquest correu electrònic per error, us preguem que n’informeu al remitent i que elimineu del sistema el missatge i el material annex que pugui contenir. Gràcies per la vostra col·laboració.

Este correo electrónico y sus anexos pueden contener información confidencial o legalmente protegida y está exclusivamente dirigido a la persona o entidad destinataria. Si usted no es el destinatario final o la persona encargada de recibirlo, no está autorizado a leerlo, retenerlo, modificarlo, distribuirlo, copiarlo ni a revelar su contenido. Si ha recibido este mensaje electrónico por error, le rogamos que informe al remitente y elimine del sistema el mensaje y el material anexo que pueda contener. Gracias por su colaboración.

This email message and any documents attached to it may contain confidential or legally protected material and are intended solely for the use of the individual or organization to whom they are addressed. We remind you that if you are not the intended recipient of this email message or the person responsible for processing it, then you are not authorized to read, save, modify, send, copy or disclose any of its contents. If you have received this email message by mistake, we kindly ask you to inform the sender of this and to eliminate both the message and any attachments it carries from your account. Thank you for your collaboration.


(Akiva Leffert) #4

It can’t hurt to work on a proof of concept, but I think it’s worth exploring the space of possible designs before jumping too far into an implementation. I have some code that adds an “annotation” declaration and adds a new attribute kind for custom annotations, though it still needs some work to be useful, most notably validating the annotations. Based on that, it seems clear to me that the major work for a first version isn’t the implementation - which has been straightforward so far - but getting community buy in.

I feel like the best way to do that is to provide convincing examples and thoroughly explore the space of designs to make sure we’re moving in the right direction while leaving room for future improvement.

-Akiva Leffert

···

On Dec 27, 2015, at 2:24 PM, Radosław Smogura <rsmogura@icloud.com> wrote:

I think that throwing out our effort is bed idea. Waiting for reflection system may cause that implementation of attributes will be impossible - both of those things should be done together!

Maybe it would be good to work on agile, iterative bases? What do you think about defining for MVP
- parsing minimised attribute declaration, enabled by command line feature switch
- producing some AST
- validate attribute tree

Later we can influence each other, and make corrections. It’s not waterfall to define everything upfront.

Best regards,
Radek

On 27 Dec 2015, at 19:59, JOSE MARIA GOMEZ CAMA <jm.gomez@ub.edu <mailto:jm.gomez@ub.edu>> wrote:

Well, it seems that we will have to wait for the reflection mechanism to be in place.

Best

El 26/12/2015, a las 20:25, Akiva Leffert <aleffert@gmail.com <mailto:aleffert@gmail.com>> escribió:

I started off a thread about this a while back: https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151207/001455.html

Based on the feedback I got, it seemed like the design for a serious custom annotation system should wait until work starts on a macro system so that they can be designed to complement each other. IMO, neither the java nor python versions feel right for swift and we can do a lot better than just copying them so it’s worth spending the time to get it right.

Additionally, the property behaviors proposal currently on the table would cover some of the use cases for annotations, depending on where it lands. It seems plausible that we can make all these features work together in a nice way.

Maybe it’s worth setting up a wiki page or something for use cases of annotations to help inform a future design as well as the design of related features?

-Akiva Leffert

Message: 18
Date: Sat, 26 Dec 2015 10:03:35 +0000
From: JOSE MARIA GOMEZ CAMA <jm.gomez@ub.edu <mailto:jm.gomez@ub.edu>>
To: "swift-evolution@swift.org <mailto:swift-evolution@swift.org>" <swift-evolution@swift.org <mailto:swift-evolution@swift.org>>
Subject: [swift-evolution] Support for custom attributes
Message-ID: <331F173E-0A78-44CC-A1E8-E30538431E37@ub.edu <mailto:331F173E-0A78-44CC-A1E8-E30538431E37@ub.edu>>
Content-Type: text/plain; charset=utf-8

Dear all,

I am quite new to Swift, though I have made some small checks within Xcode, so I could have missed some feature in swift that provides a functionality similar to the want I am proposing.

I have been using my own annotations in Java or decorators in Python, and I would like to have an equivalent functionality in Swift. As far as I have seen, there are attributes that can provide a similar solution, but AFAIK you cannot create new ones. Would it be possible to add this feature in Swift.

       Thanks in advance,

               Jose M.

Aquest correu electrònic i els annexos poden contenir informació confidencial o protegida legalment i està adreçat exclusivament a la persona o entitat destinatària. Si no sou el destinatari final o la persona encarregada de rebre’l, no esteu autoritzat a llegir-lo, retenir-lo, modificar-lo, distribuir-lo, copiar-lo ni a revelar-ne el contingut. Si heu rebut aquest correu electrònic per error, us preguem que n’informeu al remitent i que elimineu del sistema el missatge i el material annex que pugui contenir. Gràcies per la vostra col·laboració.

Este correo electrónico y sus anexos pueden contener información confidencial o legalmente protegida y está exclusivamente dirigido a la persona o entidad destinataria. Si usted no es el destinatario final o la persona encargada de recibirlo, no está autorizado a leerlo, retenerlo, modificarlo, distribuirlo, copiarlo ni a revelar su contenido. Si ha recibido este mensaje electrónico por error, le rogamos que informe al remitente y elimine del sistema el mensaje y el material anexo que pueda contener. Gracias por su colaboración.

This email message and any documents attached to it may contain confidential or legally protected material and are intended solely for the use of the individual or organization to whom they are addressed. We remind you that if you are not the intended recipient of this email message or the person responsible for processing it, then you are not authorized to read, save, modify, send, copy or disclose any of its contents. If you have received this email message by mistake, we kindly ask you to inform the sender of this and to eliminate both the message and any attachments it carries from your account. Thank you for your collaboration.