4 ms·
What kind of weird coding style is this? public let _content: Content
by DagAgren 7y ago
What kind of weird coding style is this?
public let _content: Content
- maccosmo 7y agoHey @DagAgren, author auf OpenSwiftUI: Yeah, it's weird. My plan is to stay as close to the SwiftUI API as possible. However, I had to expose some private properties for the platform specific implementation like SwiftUIEmbedded and left the underscore to indicate that this property is not meant to be used by an application developer. I don't like it either -- but that was the best I could come up with :)
- bsaul 7y agoBy looking at the source code i'm pretty sure it ended up on HN front page purely by accident. The author clearly is just working on some proof of concept and hacking stuff together. (i do agree _ and public together don't make any kind of sense though)
- saagarjha 7y agoIt’d guess it’s an implementation detail that’s been marked as public for ease of use during development.