Hacker News new | past | comments | ask | show | jobs | submit login

Objective-C is a strict superset of C, so learning C helps a lot for any iOS or Mac programming.

C++ is also heavily based on C, so it helps to learn C++.

I agree C is hardly used anymore, and for good reason, but it's still interesting to learn.




> I agree C is hardly used anymore

Any time you want to provide libraries, you'll likely use C: all languages have C FFI, and it's not possible to have a C++ FFI. So you'd have to rely on `extern C`, and then you have to build a bunch of stuff over your OO code so it can be used procedurally.

Often not worth it, C is the lowest common denominator of languages, if you want to be accessible to all languages... you'll probably use C.


> Often not worth it, C is the lowest common denominator of languages, if you want to be accessible to all languages... you'll probably use C.

Personally I see that not so much as a feature of C, but as a limitation of other languages. Interoperability is a Hard Problem(tm) which deserves more thought and effort than it currently receives. It's easy to say 'If you want interoperability, use C' because that's the current state of affairs. It would be better if interop was a solved problem.


You need a common language to interoperate. Currently, C is that common language: everybody understands C.

Some languages have built specific language interop (e.g. Erlang with Java), it's usually broken and often not even as good as C.

> It would be better if interop was a solved problem.

It is: go through C.


The Linux kernel is in C. Large parts of the Gnome project are in C.


Also the GNU utilities, Apache and nginx, and the odd interpreter (Perl, Python, Ruby) or runtime system (Haskell), OpenSSL, qmail, Emacs' and vim's core, etc.

But yeah, apart from that stuff, C is hardly used.


> I agree C is hardly used anymore

Ehh what? From the top of my head I can think of these things written in C:

linux bsd windows nt kernel python php perl sqlite gcc glibc gtk+ apache nginx gimp blender mplayer wine x264 ffmpeg libjpeg curl/libcurl zlib rsync

And there's obviously tons more I could think of if I spend some more time, then we have basically the entire embedded industry.


If I wanted to do iOS/Cocoa programming, I would go straight to Objective-C, bypassing C without stopping, but that's me.

I learned C++ without ever learning C. Although, one could make the argument that in learning C++, I learned about 80% of C anyway. I can debug and fix C code, but I don't enjoy it, and avoid it if possible.

C is interesting, in the same way that Cuneiform is interesting. Personally I just find the Roman alphabet a lot more productive.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: