S
SasQ
Dnia Fri, 16 Mar 2007 22:40:01 +0000, JohnQ napisa³(a):
Because byte doesn't have to be 8-bit. Dennis actually has shown that
there are platforms where bytes are 6-bit. If there were only 8-bit
bytes in C++, it would be impossible to use C++ for that.
The same problem has emerged with the Inthernet protocols. Because
of that different bit-sizes of bytes on different platforms, all
Internet standards use a term of OCTET for 8-bit packets and BYTE
only for machine-specific bytes. So does C++, but it use a term of
CHARACTER - the count of bits which is possible to store any
character code on the specific platform. It's only a coincidence
that on the most used and most known platforms the 'char' type
has a size of 8 bits, because it use 8-bit bytes for storing
character codes.
It's easier to program for that specific platform But try to
use that kind of language to write a platform-independent code
It depends on who is learning it and from what book/person ;J
One should know the language well if one want to code in it
It's impossible to write a book knowing only a few words.
Can you proove it, or you're only telling us truisms?
It's much easier for a bad coder. But [like Dennis mentioned already]
for a bad coder it's possible in any language. It's also that the more
features the language has, the more possibilities to screw up has a
bad coder But it's not the language's fault
How do you make a container possible to contain object of any
arbitrary type, without templates?
Use with thinking
Dennis said that operator overloading CAN lead to messy code,
not that it HAVE TO lead to messy code ;J Feel the difference:
See? :>
Even if you axe templates, operator overloading, and other things
that you don't understand well, the bad programmer still would be
able to write bad programs using 'goto' to produce spaghetti code.
But it's not a C++ fault and any other languages' fault. The knife
can be uset do cut a bread, or to kill someone.
I can't think of all the things that C++ doesn't take for granted,
such as 8-bit bytes
Because byte doesn't have to be 8-bit. Dennis actually has shown that
there are platforms where bytes are 6-bit. If there were only 8-bit
bytes in C++, it would be impossible to use C++ for that.
The same problem has emerged with the Inthernet protocols. Because
of that different bit-sizes of bytes on different platforms, all
Internet standards use a term of OCTET for 8-bit packets and BYTE
only for machine-specific bytes. So does C++, but it use a term of
CHARACTER - the count of bits which is possible to store any
character code on the specific platform. It's only a coincidence
that on the most used and most known platforms the 'char' type
has a size of 8 bits, because it use 8-bit bytes for storing
character codes.
but if a language was more platform-specific, it would
be easier to program in also.
It's easier to program for that specific platform But try to
use that kind of language to write a platform-independent code
C++ is hard to learn.
It depends on who is learning it and from what book/person ;J
To manage projects where it is used, one should know how to
use it very well IMO.
One should know the language well if one want to code in it
It's impossible to write a book knowing only a few words.
It's much easier in C++ (to write unmaintainable code)!
Can you proove it, or you're only telling us truisms?
It's much easier for a bad coder. But [like Dennis mentioned already]
for a bad coder it's possible in any language. It's also that the more
features the language has, the more possibilities to screw up has a
bad coder But it's not the language's fault
I didn't say axe the container library, just templates. Other
non-template containers would replace the template ones.
How do you make a container possible to contain object of any
arbitrary type, without templates?
Indeed! Use with caution (mostly, don't use).
Use with thinking
Dennis said that operator overloading CAN lead to messy code,
not that it HAVE TO lead to messy code ;J Feel the difference:
See? :>
For math they make a lot more sense. I haven't thought about
operators in regards to decreasing complexity of implementation.
From the maintainable code standpoint, I don't think juat that
reason is enough to axe operator overloading (Who know's,
maybe that is next!).
Even if you axe templates, operator overloading, and other things
that you don't understand well, the bad programmer still would be
able to write bad programs using 'goto' to produce spaghetti code.
But it's not a C++ fault and any other languages' fault. The knife
can be uset do cut a bread, or to kill someone.