digitalmars.D - SwiftUI Property Wrappers / Possible in D?
- =?iso-8859-1?Q?Robert_M._M=FCnch?= (10/10) Apr 28 2020 See:
- Adam D. Ruppe (5/7) Apr 29 2020 I just skimmed it but I'm pretty sure yes, and in fact we can
- =?iso-8859-1?Q?Robert_M._M=FCnch?= (13/20) Apr 29 2020 Thanks for checking it out and good to see you have the same impression.
See: https://swiftwithmajid.com/2019/06/12/understanding-property- rappers-in-swiftui/ I'm wondering, would something like this behaviour be possible with CTFE and UDAs? Getting a reactive infrastructure which can be used in a least invasive way would be a nice pattern/feature. Same for handling global state and propagating state changes. -- Robert M. Münch http://www.saphirion.com smarter | better | faster
Apr 28 2020
On Tuesday, 28 April 2020 at 20:48:59 UTC, Robert M. Münch wrote:I'm wondering, would something like this behaviour be possible with CTFE and UDAs?I just skimmed it but I'm pretty sure yes, and in fact we can probably do it with almost the same syntax since there appears to be an extra ui layer processing it which is exactly what D would need to pull it off.
Apr 29 2020
On 2020-04-29 13:42:24 +0000, Adam D. Ruppe said:On Tuesday, 28 April 2020 at 20:48:59 UTC, Robert M. Münch wrote:Thanks for checking it out and good to see you have the same impression. My D skills are most likely way to weak from being able to do a prototype. Since I'm using RX for all the reactive stuff at the moment, I'm not sure if it makes sense to utilize it or go a different route. Same for the global state stuff, which could be handled by a Redux lib. IMO getting such fundamental patterns in a idomatic way into Phobos would be a good step. Such things shouldn't be invented over and over again. -- Robert M. Münch http://www.saphirion.com smarter | better | fasterI'm wondering, would something like this behaviour be possible with CTFE and UDAs?I just skimmed it but I'm pretty sure yes, and in fact we can probably do it with almost the same syntax since there appears to be an extra ui layer processing it which is exactly what D would need to pull it off.
Apr 29 2020