
  OO C is passable - nickb
http://www.yosefk.com/blog/oo-c-is-passable.html
======
tptacek
This guy's blog is awesome. Go read his archives.

------
stcredzero
If you want something like C, but with virtual functions, then you should look
at Lua. It's fast, minimal, and designed to be embeddable. It doesn't start
with OO, but you can actually easily build as much OO as you want. In fact,
"something like C, but with virtual functions" almost describes Lua. (You have
to add that it's Dynamic and Interpreted.)

~~~
listic
Is Lua fast? I heard it has double as its only numeric data dype. How can that
ever be fast?

Here, look at the benchmarks:
[http://shootout.alioth.debian.org/gp4/benchmark.php?test=all...](http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=lua&lang2=gcc)

~~~
davidw
For a "scripting language", yes. Compared to C, no.

~~~
stcredzero
If you're going to be crunching petabytes of 32 bit floats, then by all means,
use C or even FORTRAN. Most of us don't have a requirements that stringent,
and something like Lua is just fine.

Unfortunately, a lot of us are brainwashed into thinking we've got to act like
weather simulation programmers, when we're really doing business apps.

~~~
davidw
I wasn't making any value judgments about languages and speed, only stating
the obvious that Lua is very fast as an interpreted language, but not so fast
compared to fast compiled languages.

------
xirium
Null terminated vtables. That's horrid. The performance must be terrible.

~~~
ajross
Why? The time to search a three entry vtable (or whatever) is still an order
of magnitude lower than the time to fetch the thing from main memory in the
first place. Performance optimization stopped being about instruction cycle
counting a few years back.

