C
Carmen Sei
the C++ way of accessing a library is using #include, consider the
following include herarichy:
main.cpp -> Demo.h -> Config.h -> Gconfig.h -> ConfigDef.h
the above shows main.cpp include -> Demo.h and Demo.h include ->
Config.h ... and so on
then basically, main.cpp had inheritan everything of the 4 header
files (Demo.h, Config.h, Gconfig.h, ConfigDef.h)
Sometimes, the include chain gets longer and One would need to dig
into deep level to see a function call defined in which header library
file.
On the other hand, in Java, one uses import to access a Library file
like:
import java.io.File
Java doesn't follow the deep chian like C++ include header files does.
If you import a java library like java.io.InputStream, you will have
access to InputStream only and doesn't have C++'s chain header files.
Does C++ programmer found the include chain is hard to manage once the
source base grows big? and most of time, one needs to dig into the
header file like 3 level up to find the object/variable is defined.
following include herarichy:
main.cpp -> Demo.h -> Config.h -> Gconfig.h -> ConfigDef.h
the above shows main.cpp include -> Demo.h and Demo.h include ->
Config.h ... and so on
then basically, main.cpp had inheritan everything of the 4 header
files (Demo.h, Config.h, Gconfig.h, ConfigDef.h)
Sometimes, the include chain gets longer and One would need to dig
into deep level to see a function call defined in which header library
file.
On the other hand, in Java, one uses import to access a Library file
like:
import java.io.File
Java doesn't follow the deep chian like C++ include header files does.
If you import a java library like java.io.InputStream, you will have
access to InputStream only and doesn't have C++'s chain header files.
Does C++ programmer found the include chain is hard to manage once the
source base grows big? and most of time, one needs to dig into the
header file like 3 level up to find the object/variable is defined.