C tips (again)

bearophile bearophileHUGS at lycos.com
Fri May 1 15:48:21 PDT 2009


Walter Bright Wrote:
>C has reflection?<

Yes, of course, if you implement it. C has OOP too if you implement all that machinery. C is quite efficient, so it gives you the power to implement almost everything (the problem is, often things get too much complex if you want to implement them manually in C, so sometimes you are unable to use such power. That's the purpose of the idioms that are bricks of medium/high level languages).


>Why does it have to be written in C?<

CPython is written in C (and a bit of Python for some libs). I'd like to add a module to the Pythonh 2.7 standard lib, and to be efficient it can't be written in Python. So I have to use C. D isn't allowed in the CPython codebase.

Bye,
bearophile



More information about the Digitalmars-d mailing list