Every so often I dig out my Xcode stuff and have a go at exploring developing an idea for Mac OS X. Everytime the same thing happens to me: Objective-C is such an offensive language to my sensibilities that I get diverted into doing something else.
All the lessons that we have learned the hard way over the years — the importance of strong static typing, the importance of tools for large scale programming — seem to have fallen on deaf ears in the Objective-C community. How long did it take to get garbage collection into the language? I also feel that some features of Objective-C represent an inherent security risk (in particular categories) that would make me very nervous to develop a serious application in it.
As it happens, I am currently developing a programming language for Complex Event Processing.
Almost every choice that I am making in that language is the opposite to the choice made for Objective-C — my language is strongly, statically typed; it is designed for parallel execution, it uses a functional programming foundation, it is symbolic in nature, designed to permit development of large programs, etc. etc.
Hence my allergic reaction and yet again I veer off into something that does not involve actually making a beautiful application for a platform that I much admire.
I have to also admit that I regret Apple’s choice to abandon Java development. I am not an apologist for Java, but it is significantly better for programming in than Objective-C.
I have heard that some of the features of Cocoa are impossible to do in Java. I have strong doubts about that.
I just wish that Apple’s sense of design extended to the underlying technologies as much as it does to user engineering.
I’m too interested in languages for complex event processing.Is this work something that you can share the progress for or confidential stuff for a company?
Cannot discuss it much currently. Although the plan is to open it out a bit further downstream.
“All the lessons that we have learned the hard way over the years — the importance of strong static typing”
I don’t know when I was supposed to learn anything about “strong static typing” except that it’s painful and slow, but Perl, Python, Ruby, Javascript, and most of the other popular languages from the past couple decades are all going the same way. Even Java and C# are adding more dynamic features, and almost everyone I know writing code for the JVM this century is doing it using a more-dynamic-than-Java language.
“I also feel that some features of Objective-C represent an inherent security risk (in particular categories) that would make me very nervous to develop a serious application in it.”
I don’t understand this. Are you just projecting your dislike of Objective-C into other areas (security), or do you actually have some case in which categories are a security risk? Other languages have had similar features for decades, and this is the first I’ve heard of a security issue with them. Categories can be misused in a way which introduces a security risk, but then, so can “if”-statements, or any other language feature.
“I have heard that some of the features of Cocoa are impossible to do in Java. I have strong doubts about that.”
This contradicts your earlier statement. If categories can be done in Java, then aren’t they a security risk in that language, too?
My biggest issue with Objective C wrt security is perhaps less an Objective C issue than a Mac OS X issue: automatically linked-in extensions. Simply dropping a framework into the right place in your file system can have the effect of automatically enhancing programs with new functionality. This (used to be/is) used for example in adding new input managers. So, if someone can be persuaded to install a new input manager, that leaves ALL their programs open to risk.
As far as static typing is concerned I do not understand the comment about being slow. Slow to program? Slow to compile?
Within reason, I do not see that the performance of compilers is an issue. I do understand that some people who shall be nameless design programming languages solely on the basis of their compilation speed. I think that that can only be a reaction to their C++ experience. Other compilers manage to implement very powerful type checker without being slow.