Live data from Hacker News

The Death of Cocoa

nshipster.com

101–110 of 118 posts

Re: The Death of Cocoa

#101
post #99

Earlier quoted context omitted.

Minor nit to give credit where it's due. 280 North had three founders: http://en.wikipedia.org/wiki/280_North,_Inc .

And for what it's worth, it took a hell of a lot longer than a couple of months to build something useful. Years later and it still isn't a full port of what was available at the time in Cocoa.

I saw a talk of one of you guys... you mentioned that it took a lot of experimentation before you even considered not using plain JS. But you should also not downplay your achievement! You did a great (maybe not complete) port of Objective-C/Cocoa which was good enough to be used by a lot of people and good enough for Motorola. :)

And Apple is certainly in a better position to do such ports than you were back then: They have the full source code of every framework they developed. I am not saying it is trivial or not much work but it is doable over a couple of years... don't you think? You have certainly more internal knowledge than I do.

Re: The Death of Cocoa

#102
post #80

Earlier quoted context omitted.

What does "GC" stand for in this context?

Garbage Collection. Not that long ago Apple came out with full GC in Objective-C to a lot of fanfare (no more retain releases yay). Not long after that they said to just use ARC (which is compiler retain/releases) because the GC was not working well. Today, it's hard to find any mention of the GC.

The GC had at least one fundamental flaw:

If your app used GC then everything your app links against or loads at runtime has to be GC-compatible. So Apple had to make all of it's frameworks GC-compatible. But many 3rd-party frameworks didn't.

Also: If your app used WebView to load a web site which contained something with flash (YouTube, ...) then your GC app would crash immediately because WebView loaded the Flash plugin which was not GC-compatible.

Thus using a WebView to load arbitrary sites was incompatible with GC.

Re: The Death of Cocoa

#103
post #41

I like Matt, but I think he's wrong. Objective-C isn't going anywhere, just like C++ hasn't gone anywhere, nor has C left the building either. There are 124 public frameworks in the 10.10 sdk, 357 private ones. While a good chunk of these are written in Objective-C, a good deal of them are written in C, or Objective-C with the guts in C++. AVFoundation, for example, is mostly C++ in the "backend". The amount of effor…

I appreciate your feedback, but I think you're reading an entirely different argument than what is presented in the article. It's not that everything is going to be rewritten in Swift (I'm not sure where you got that idea). Rather, the article is an exploration of what Swift without Obj-C & Cocoa could be, and under what circumstances that might become a reality.

If Swift doesn't have to accommodate Objective-C as it currently does, it's reasonable to assume that system frameworks will be designed and built in ways that make the most of Swift's language features, just as Cocoa currently does with Objective-C.

Re: The Death of Cocoa

#104

Holy clickbait headline, Batman. Yes, Carbon has been replaced in the past but that involved a $400 million acquisition and 10 years of continual complaining, kicking and screaming from established Carbon users who had no desire to change. I doubt it's an example of how future changes will occur. Replacing entire application frameworks is hard. Super, super hard. It seems like it might be simple to start by replacing…

I have no illusions about the amount of effort and investment necessary to change technology stacks. Carbon was only officially deprecated in OS X 10.8. To speak of the death of technology is only to acknowledge that it is mortal.

My claim isn't that everything will be rewritten in Swift—far from it. Instead, the article is an exploration of what it would mean for Swift to evolve beyond the constraints of Objective-C & Cocoa interoperability, and how that may occur as Swift gains momentum.

Re: The Death of Cocoa

#105
post #96
post #36

This feature of strings is cool! It sounds like the end of the Unicode encoding mess that most languages drag the programmer into: "One of the truly clever design choices for Swift's String is the internal use of encoding-independent Unicode characters, with exposed "views" to specific encodings: A collection of UTF-8 code units (accessed with the string’s utf8 property) A collection of UTF-16 code units (accessed wi…

Haven't used Swift of its strings yet, but I have used string/unicode in python, NSString in Cococa, and string in Go. The only one that hasn't bit me in the ass is string in Go; the approach they take is a sequence of bytes, utf8 encoded by convention (which is easy to follow); there are methods to work with unicode code points when you need to, otherwise it's just bytes. It's simple, well-defined, non-magic, and do…

Python 3 uses utf8-as-a-default as well. Not to mention you can easily specify the encoding as well in python 2. Never bites me.

Re: The Death of Cocoa

#106
post #48

Earlier quoted context omitted.

14 hours a day, and your problem is ambiguous documentation and temperamental behavior? I don't mean to detract from your primary points, but 14 hours a day is quite a chunk of time. I hope its not your norm, because that just sucks.

That just sucks for you . I am not you . 10-14 hours a day is the norm and I still get in the gym, dinner with the wife, vigorous sex, a few games of vain glory and other facets of "normal life". I also take weeks off at a time because I mostly work for myself. In fact, I've been traveling for the last 4 years (I moved to Vietnam from NYC about a year ago). So, it might suck for you, but I would hardly say my life su…

I have this image of you, in a dining room with a mirrored wall, having vigorous sex with your wife while she is eating a sensible dinner - trying to safely navigate a forkful of mixed greens. You are looking at yourself in the mirror and flexing interspersed with loud beckonings of "Am I VIGOROUS?! YES I AM! GETTING SHIT DONE!"

You get done, smack your own butt playfully, and walk out with your plates saying, "I have to get some other normal shit done. Love you!... and you too wife!"

I'm not saying there's anything wrong with you or your lifestyle... but when you awkwardly present the style of your sex life as part and parcel to normal living, it underlines that you are a bit detached from social norms, thus normal life.

BBC interviews people on the street... BBC: So how are you getting on with life these days? Person: Ahhh... well, it's mostly normal day to day stuff. Kids, pub, job, vigorous sex, groceries, some football or cricket when I can. Just normal all around.

Re: The Death of Cocoa

#108
post #41

I like Matt, but I think he's wrong. Objective-C isn't going anywhere, just like C++ hasn't gone anywhere, nor has C left the building either. There are 124 public frameworks in the 10.10 sdk, 357 private ones. While a good chunk of these are written in Objective-C, a good deal of them are written in C, or Objective-C with the guts in C++. AVFoundation, for example, is mostly C++ in the "backend". The amount of effor…

I appreciate your feedback, but I think you're reading an entirely different argument than what is presented in the article. It's not that everything is going to be rewritten in Swift (I'm not sure where you got that idea). Rather, the article is an exploration of what Swift without Obj-C & Cocoa could be, and under what circumstances that might become a reality. If Swift doesn't have to accommodate Objective-C as it…

    What is almost certain, however, is that Cocoa, 
    like Objective-C, is doomed. It's not as much a 
    question of whether, but when.
That was the part I was responding to.

Re: The Death of Cocoa

#109
post #48

Earlier quoted context omitted.

14 hours a day, and your problem is ambiguous documentation and temperamental behavior? I don't mean to detract from your primary points, but 14 hours a day is quite a chunk of time. I hope its not your norm, because that just sucks.

That just sucks for you . I am not you . 10-14 hours a day is the norm and I still get in the gym, dinner with the wife, vigorous sex, a few games of vain glory and other facets of "normal life". I also take weeks off at a time because I mostly work for myself. In fact, I've been traveling for the last 4 years (I moved to Vietnam from NYC about a year ago). So, it might suck for you, but I would hardly say my life su…

> I moved to Vietnam from NYC

OT but why did you move and how is Vietnam? Are you from Vietnam?

Just wondering how it is to live there.

Re: The Death of Cocoa

#110
A lot of people on the thread are focusing on how hard/not hard it would be to make a wholesale transition of Cocoa from one language to another ... I'm coming from the world of Windows, which might offer an instructive history. In short, Microsoft would think nothing of making a change like this.

The Win16/Win32 API was a thing of beauty and was the whole universe for several years. It was written in C.

Then MFC came. It was the new hotness in the late 90s and it was based on C++.

Early 2000s. Goodbye to C/C++. If you want to build a native Windows app, you would probably think first of C#, which used a completely new, non-C Windows API called Windows Forms.

Today ... want to write a Windows app? Visual Studio's new primary language for you is Javascript, talking to a complete javascript-native API for windows.

And let's not forget Visual Basic, the most popular language in the world, which has its own Visual-Basic esque toolset and Windows API.

Microsoft certainly has a much bigger vision for its development tools, and a much longer history. Its very first product, after all, was a programming language (MS Basic) - and developers have in a sense been a much larger target market for them than they have for Apple in their shared 30+ year history.

But now Apple, with its skyrocketing income, surely must be aspiring to the herculean scale of Microsoft's year-in/year-out dev tool undertakings.

My bet is Apple will come out with a Swift-native version of Cocoa within 18 months or so. ObjectiveC Cocoa will be supported for a LONG time (I believe all the above MS dev technologies are still usable in some form or another ...)

Post reply on HN