3 ms·
It appears as an NSSecureTextField pointer which could be confused with another NSTextField. One drag-drop away in Interface Builder.
by afandian 9y ago
It appears as an NSSecureTextField pointer which could be confused with another NSTextField. One drag-drop away in Interface Builder.
- gowld 9y agoHooray for Dynamic Typing!
- FabHK 9y agoGood point, if secure/private/whatever you want to call it were encoded in the type system, that would most likely have been caught by the compiler.
- jmull 9y agoIt's actually not a very good point because NSSecureTextField inherits from NSTextField and it's specifically designed not to protect from programmatic access to the text. Of course, you can argue about the design but it's still not a dynamic vs. static type issue.
- cat199 9y agoeven then: FooWidget(string s) and SecureFooWidget(string s) could just as easily been confused..
- FabHK 9y agoI didn't have Objective-C in mind, more Haskell or so. My understanding is that you could design things such that it is quite a bit harder to make such an error. I might well be mistaken on that, but at any rate, Cocoa/Obj-C/Swift specifics don't defeat the argument I had in mind (though not written down :-)