Re: Can an use introspection to determine if its a production app from the App Store?
Re: Can an use introspection to determine if its a production app from the App Store?
- Subject: Re: Can an use introspection to determine if its a production app from the App Store?
- From: Fritz Anderson <email@hidden>
- Date: Fri, 31 Oct 2014 12:22:37 -0500
On 31 Oct 2014, at 6:40 AM, Charles Jenkins <email@hidden> wrote:
>
> My day job is programming in C# for Windows computers. I was really excited when Swift came out because it’s so similar to other languages I know well and use and admire.
I’ll take this as the root theme of your message.
Many of your objections amount to being unhappy that Cocoa, OS X, and their tools are not C# on Windows. C# and Windows are worth knowing, but most things that are worth knowing are neither C# nor Windows. They are that way for thoughtful reasons, and not as duct tape over their falling short of being C#.
Even if you never use any other tool or environment again, knowing about others will make you a better C# developer.
Named arguments and strict typing are found in many modern languages. Smart people differ on the merits, but many smart people think they are good ideas.
An out-of-band value for “no result” has been a feature of programming languages since SQL’s NULL at least; as late as the 1980s, the biggest horror stories of computing centered on collection proceedings for utility bills of $99,999.99. Some such languages use it inconsistently, and stick developers with the pain of debugging it.
It is rational to provide an out-of-band value; to make it uniform; to take advantage of modern computers’ ability to detect fatal errors in its use; and to force developers, the only ones able to abate such errors, to abate them. The compiler pelts you with ! and ? gotchas precisely because you hadn’t noticed the pitfalls.
I infer you don’t like the Delegate design pattern used in (NS|UI)TableView and elsewhere. The Delegate pattern has been documented as sound OO practice for twenty years, and not just in ObjC/NeXTStep. Even critics allow it is one of Cocoa’s strengths. It will never go away. See Wikipedia.
“Banish[ing] Objective-C from all libraries” would be like superseding every C# library with a total redesign: conceivable, pointless, will never happen.
On the other side:
When I am feeling especially cynical, it seems Swift syntax has a lot of sugar that makes it less intimidating in a 30-minute presentation, but harder to write.* The impedance mismatch with Cocoa is artfully minimized and is improving, but it makes Swift much more complicated. The error messages are often inscrutable, or can be scruted only by reference to API that for now is mostly unpublished.** Welcome to tech. What can get better has been getting better.
* (For some of this — maybe most — I’m held back because I haven’t developed the instincts I have for ObjC and Ruby. Bang-suffixed types and `??` are sugar for things that could be clearer if expanded, but I wouldn’t give them up.)
** (Unless you add `import swift` to a .swift file and command-click `swift`. I wish I could properly credit the humanitarian I learned this from — NSHipster?)
— F
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden