Live data from Hacker News

I loved C. But it always fell short for me. Objective-C fixed that.

red-sweater.com

81–82 of 82 posts

Re: I loved C. But it always fell short for me. Objective-C fixed that.

#81

Earlier quoted context omitted.

In terms of size, they're almost the same (Objective-C classes are implemented with structs). In terms of speed, the difference is absolutely huge. You can generate a random number faster than you can make an Objective-C call. But, it's fast enough for 95% of things people do with it.

Objective-C message sends are not much slower than C++ virtual calls: http://mikeash.com/pyblog/performance-comparisons-of-common-... And that's from 2008. Clang's improved it a lot.

Actually, that's on an iPhone. Here's the article for OSX from the start of 2008 (two months before your link), where the cached message call comes out faster than the virtual calls, and the non-cached is ~ 4.5x slower instead of ~ 2x on the iPhone:

http://mikeash.com/pyblog/performance-comparisons-of-common-...

Re: I loved C. But it always fell short for me. Objective-C fixed that.

#82

Earlier quoted context omitted.

I was personally a little off-put by Go. Some things just felt a little odd to me, after an admittedly small amount of time with the language (implemented a trivial app with it to play around). That said, I did quite like some aspects of it: goroutines, channels, functions can be added to structs. I am hoping that rust makes it out of the lab at some point.

I don't have a lot of experience in Go either (I'm writing my bot for the AI challenge in Go), but so far I've been very happy with it. What did you feel was odd?

things I found 'odd':

* The "exception handling" (or lack thereof). Defer, panic, and recover do provide an interesting means to achieve some similar behavior, but I ended up testing return values _a lot_, and all over the place. It felt very boilerplate and messy. Also, I found it odd that they claimed that the 'try-catch-finally idiom' was convoluted, then came up with defer, panic, and recover. Which calls code on function exit. I liked defer (great way to clean up allocations in reverse on the way out), but I did not find panic-recover as a convenient replacement for exception handling (nor does that seem to be the proper use-case for it anyway).

* new vs make. I don't see why they didn't just unify these in some way. Purity over pragmatism, perhaps.

* goto

* static compilation only (no shared libraries). I know static libraries are safer and sure do make deployment dreamy, but it would be nice to benefit from shared libraries if desired (easier to deploy security fixes, memory savings, etc).

Post reply on HN