Re: These are identical, right? char const* and const char*
From: Hattuari (susudata_at_setidava.kushan.aa)
Date: 03/22/04
- Next message: Hattuari: "Re: Memory Allocation: new int[s] vs. vector<int>p; p(s)"
- Previous message: John Carson: "Re: Memory Allocation: new int[s] vs. vector<int>p; p(s)"
- In reply to: John Carson: "Re: These are identical, right? char const* and const char*"
- Next in thread: John Carson: "Re: These are identical, right? char const* and const char*"
- Reply: John Carson: "Re: These are identical, right? char const* and const char*"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 22 Mar 2004 06:45:56 -0500
John Carson wrote:
> "Hattuari" <susudata@setidava.kushan.aa> wrote in message
> news:HfadnTc547fO4sPdRVn-vg@speakeasy.net
>>
>> If I'm scanning through code looking for some kind anomaly, my eye is
>> far more likely to pick it up if there is a very predictable pattern
>> for each type of semantic element. If I'm working in an environment
>> where dozens of different coders have contributed code, and each one
>> has chosen a different variant of the available syntactic means of
>> expressing the same semantic intent, the code is going to seem very
>> incoherent.
>
> Nonsense. With a little familiarity, you won't even register when const
> char is used and when char const is used. I'm not going to argue pros and
> cons because it isn't important enough to be worth an argument.
My statement was a general statement about uniformity. My first job
troubleshooting digital systems was in 1979. It was an integrated network
of robotic systems driven by a central computer communicating with what are
now called "embedded systems". I've also done my share of working with
code. Not to mention having read several highlevel works in mathematical
physics. The level of Einstein's the _Meaning of Relativity_. I have a
fair sense of the connection between the form in which information is
presented, and how the human mind processes it. Not to mention that I have
also read research literature discussing the neurological mechanisms of the
process as well.
>> The word 'Unicode' occurres once in the 2003 standard, and 'utf' is
>> absent. The word 'thread' likewise has only one occurrance. This
>> means that, in addition to mastering the core language, I have to
>> learn a large amount of external material in order to program in and
>> for the 21st century.
>
> Big discovery. Next you will be telling me that water is wet.
>
> C++ is consciously minimalist because
>
> 1. it is meant to run on everything from mainframes to desktops to
> embedded systems and many of the systems it runs on don't have things like
> files or screens or threads or ...
Java was originally an embedded systems programming language, and has never
completely left the domain. There's a lot of new focus in that area as
well.
> 2. incorporating everything into the language means not taking advantage
> of the unique features, or adapting properly to the limitations, of each
> platform.
That really depends on the infrastructure supporting the language. C++ can't
do anything without a compiler unless its running on some kind of
interpetting hardware or 'virtual machine'. Java can be compiled with the
same compiler I use to compile C++, so I'm not sure exactly what advantage
I gain at the platform level with C++.
> If you don't like this, then C++ is not the language for you. Everyone is
> aware that the omission of many things from the standard is inconvenient
> in some respects. Anyone with a clue knows that these omissions are for a
> reason.
Some of those reasons may have not been seriously reexamined in the past
decade. But that really isn't addressing my point. My point was that
there is considerably more to learn with C++ to get to the point where i
can work in the same areas I can in Java with far less initial learning. I
used the fact that Unicode and threading are not part of the standard in
any significant way, to demonstrate the amount that I am required to learn.
That was presented as an argument for eliminating the unnecessary obstacles
to acquisition of the language.
> Exactly what should and should not be in the standard is a matter
> of ongoing debate. Boost (which is intended as a testing ground for
> possible additions to the standard) includes a small threads library and
> there have been suggestions that the standard should include some basic
> graphics. Other people think both are bad ideas.
I've seen a proposal to add class and function synchronization to the core
language. Personally, I believe changing the default character set to
UTF-8 would be a lot more beneficial than native threading. I don't see any
need for graphics in the standard library. But that's neither here nor
there.
> You continue with your constant refrain: why isn't C++ just like I want it
> to be and just like I am familiar with?
No, it's not a question of it being unfamiliar. It's a question of it
having features which I believe are not ideal. Because I can point to Java
and show an example of something with that feature doesn't mean that I got
the idea from Java. Mathematica uses UTF at the core, and I've known about
UTF for far longer than I've known about Java. The same can be said about
my opinions regarding specifying the default size and signedness of all
fundamental types. The reason for that ugly feature has probably been a
non-issue for 15 years. Even standard 'C' has corrected that fault.
> The answer hasn't changed. It is
> because C++ has to satisfy many people besides you. Some relevant comments
> by Stroustrup are in the links below.
Finally you understand. So you are agreeing with me now?
-- p->m == (*p).m == p[0].m
- Next message: Hattuari: "Re: Memory Allocation: new int[s] vs. vector<int>p; p(s)"
- Previous message: John Carson: "Re: Memory Allocation: new int[s] vs. vector<int>p; p(s)"
- In reply to: John Carson: "Re: These are identical, right? char const* and const char*"
- Next in thread: John Carson: "Re: These are identical, right? char const* and const char*"
- Reply: John Carson: "Re: These are identical, right? char const* and const char*"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|