Log in

No account? Create an account
Why Objective C? - Fish Magic

> Recent Entries
> Archive
> Friends
> Profile
> My photos at flickr

January 11th, 2013

Previous Entry Share Next Entry
12:31 pm - Why Objective C?
I'm often asked why Tarantool is written in Objective C. Damien Katz, my ex-colleague from MySQL AB :), wrote a very good post on the strengths of C. We use Objective C as "C with exceptions". Objective C' @finally clause allows for simple integration of exception-aware code with C code. In contrast, the only sensible way to deal with exceptions in C++ is RAII, and this pretty much means that you forget about C the moment you decide to use exceptions in your program.

One serious "deficiency" of C is that it doesn't bring along the programming paradigms and patterns found in modern programming languages. In other words, it doesn't teach you programming culture. This is why, I think, it is
much better to return to C after a few years with other languages. There is something unique to learn in almost every modern programming language.

Often, a larger project uses a ton of languages and instruments. Tarantool is not an exception: apart from C and Objective C we use Lua, Ragel, Bison, a configuration file parser of our own breed, and this is just for the server itself. For tests, we use Python, Perl, PHP and Shell. Some of our benchmarks are written in Java.

(3 comments | Leave a comment)


[User Picture]
Date:January 11th, 2013 09:00 am (UTC)
Damien's post is awful.

Here is a good response to this "post" http://groups.google.com/group/erlang-programming/msg/d40c36a1d125e42a

[User Picture]
Date:January 11th, 2013 09:45 am (UTC)
Hi Max, I agree that Erlang community is not treated justly when the post mentions a bug in Erlang core without giving a link to a bug report.

But the post is not about Erlang, after all. I often find it hard to reason why not choose a better language. RethinkDB, for example, is a ton of pretty advanced C++. We experience a lot of pain with Objective C runtime and compiler support. But there *are* reasons some successful projects (even modern) still do not use C++: InnoDB, GTK, nginx, most scripting languages, including Erlang, the list can be very long. And very few people have actually tried to understand why the prevalence of good open source software is written in C.
[User Picture]
Date:January 11th, 2013 09:54 am (UTC)
It is an interesting discussion. Of course, Damien's opinion isn't interesting at all, so let's don't return to it.

Question is: why do major part of self-contained opensource software is written in C, while commercial products are written in other languages?

> Go to Top