[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: C++ & Lua for people like me?
- From: GrayFace <sergroj@...>
- Date: Thu, 24 Mar 2011 04:00:12 +0600
On 22.03.2011 3:37, Patrick Mc(avery wrote:
It seems that there are a lot of people calling it bloated and buggy
and even professionals seem to stick to a subset because it's so big.
Would Lua allow me to stick to an even smaller subset? If so, do you
have any recommendations about what parts of C++ to skim over and to
use Lua for instead(like perhaps the string library?).
I'm not a C++ professional, I spent most of my time in Delphi, but here
are my thoughts.
If you're fine with C, you have nothing to worry about. You can write
the same good old C code in C++, but the better thing to do is to use
C++ style, thus the the first things to exclude from the subset are some
legacy functions and approaches that come from C.
I do think that C++ is somewhat ugly at times and has a lot of gotchas.
As funny as it sounds, the main problem for me is lack of certain
features. It contains many complex feaures, but doesn't contain some
simple ones that work just right. For example, it doesn't contain
modules support and uses includes mechanism, inappropriate for the task
in certain ways. It has no simple way to statically import functions
from libraries, but instead a program to create LIBs from DLLs. The OO
of C++ (excluding templates) is mostly inferior to that of Delphi, but
more complex. I can explain this statement later if someone is
interested. Yet I do adore macros and templates. Macros also illustrate
what I'm talking about, but relevant to C. They are 'evil' just because
there are no inline functions in C, thus macros are used where they
Another problem is lack of standardization, when you can do the same
thing the C way, the C++ way and the Microsoft way, e.g. char*,
std::string and CString.
Sergey Rozhenko mailto:firstname.lastname@example.org