3 ms·
It occurred to me that Apple might have added extensions to C and C++ along with whatever is in Objective-C, and went off to look it up. So today I learned some
by spacemanaki 15y ago
It occurred to me that Apple might have added extensions to C and C++ along with whatever is in Objective-C, and went off to look it up. So today I learned something new:
http://en.wikipedia.org/wiki/Blocks_(C_language_extension)#Examples http://en.wikipedia.org/wiki/Blocks_(C_language_extension)#E...
But it's almost as ugly as the equivalent Java, and I'm pretty sure the equivalent existed in Java 1.0^, while this apparently is new as of OS X 10.6 and iOS 4.
I still think it's disingenuous to say that "C will have closures before Java" when this is a nonstandard extension. If you think it's easier to work with, that's totally fine. But then we're just arguing over syntactic noise and frankly I don't like either syntaxes. And I still don't think it's constructive to talk about a programming language as a ghetto.
^ Nope, I think I was wrong. Nested and inner classes were added in 1.1
- fleitz 15y agoI'm not thrilled about the block syntax either, I do prefer it to java. I'd much rather a C#, F# or ruby style syntax. It's not that you CAN'T accomplish a bunch of things in Java it's just that it's a pain to do so. When one looks at java they see a language spec and virtual machine dominated by a bunch of people who are resistant to any improvement that might break compatibility with code written in 1994. Those people or their employers also use various capricious tactics to stall anyone else from improving it. It's essentially been left to rot while the owners of the language strip mine the value. When a situation such as that exists I think the word ghetto is the perfect way to describe the ecosystem. Java is an ecosystem designed to cater to the task masters who oversee the pair programmer chain gangs in the cube farms. If they are happy with that lifestyle then so be it. Who am I to say they can't live that way. But it doesn't make it not a ghetto.