[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FileAccess: C or C++ ?
Christian Reiniger wrote:
> Hi all,
> Quite some points around the File Access system have accumulated here.
> Let's start with:
> What language do we use for the implementation of the core PakFile reading
> C is more controllable (in terms of size and speed), but C++ makes it
> easier to handle the dir structure etc.
> It should also be noted that it's not neccessary to use the fancier C++
> features like templates and virtual functions here.
> What do you think?
As long as performance is not really critical it's better to use c++
streams because its stronger typed, this will make it easier to write
correct code. Also the c++ streams are better when handling user defined
types since you can overload the stream operators.
So as long quality and correctness is more important then speed I would
say c++ otherwise c should be used. This asumes that the c file
functions are faster then streams which I believe is allmost allways
true, thought I did not test it.