 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Thu Jul 06, 2006 3:24 pm Post subject: C++ standard |
|
|
Java is same on every platform. If I write a java compiler or JVM, I
HAVE to confirm to java standard. IMHO it has helped JAVA to grow.
That's not the case with C++. Code which works perfect on SUN OS sun
CC may not even compile on Linux G++.
I can write my own compiler which does not stick to C++ standard and
still sell it as C++ compiler. (Correct me if I am wrong)
Question 1
Why don't we enforce C++ standard on compilers?
Question 2
C++ is not exactly controlled by one company or person.
Who is expected to control C++?
Is it C++ standard committee? If not why does it not control?
Question 3
Java world has come up with solid concept / specifications like J2EE
(or servlet JSP).
Why C++ committee does not try to setup groups for such technologies
that can help C++ grow?
Question 4
Java C# give solid ready to use standard class framework C++ is far
behind. Why standard for such class framework is missing?
I may have asked many stupid questions. (blame it on lack of C++
skills)
I hope I am not impolite in asking these questions.
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ] |
|
| Back to top |
|
 |
Frederick Gotham Guest
|
Posted: Fri Jul 07, 2006 3:04 am Post subject: Re: C++ standard |
|
|
Bestbrain posted:
| Quote: | Java is same on every platform. If I write a java compiler or JVM, I
HAVE to confirm to java standard. IMHO it has helped JAVA to grow.
|
"have to" or "are encouraged to"?
| Quote: | That's not the case with C++. Code which works perfect on SUN OS sun
CC may not even compile on Linux G++.
|
Hence the terms, "portable code" and "non-portable code".
| Quote: | I can write my own compiler which does not stick to C++ standard and
still sell it as C++ compiler. (Correct me if I am wrong)
|
I could write a Java compiler and sell it as a coffee maker.
| Quote: | Question 1
Why don't we enforce C++ standard on compilers?
|
We don't have a big enough gun.
| Quote: | Question 2
C++ is not exactly controlled by one company or person.
Who is expected to control C++?
Is it C++ standard committee? If not why does it not control?
|
C++ is controlled by the C++ programming Standard, and thus by the
keepers of the Standard, the Standard Committee.
| Quote: | Question 3
Java world has come up with solid concept / specifications like J2EE
(or servlet JSP).
Why C++ committee does not try to setup groups for such technologies
that can help C++ grow?
|
There are plenty -- wxWidgets for GUI for example.
| Quote: | Question 4
Java C# give solid ready to use standard class framework C++ is far
behind. Why standard for such class framework is missing?
|
Elaborate on that. I'm not incredibly familiar with Java, but from what I
know, its "classes" are a watered-down version of C++ classes.
--
Frederick Gotham
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ] |
|
| Back to top |
|
 |
Alan Griffiths Guest
|
Posted: Fri Jul 07, 2006 3:06 am Post subject: Re: C++ standard |
|
|
bestbrain (AT) gmail (DOT) com wrote:
| Quote: | Java is same on every platform.
|
This is not so, but I'll pass over it as not relevant to the main
thrust of your post.
| Quote: | If I write a java compiler or JVM, I
HAVE to confirm to java standard. IMHO it has helped JAVA to grow.
That's not the case with C++. Code which works perfect on SUN OS sun
CC may not even compile on Linux G++.
I can write my own compiler which does not stick to C++ standard and
still sell it as C++ compiler. (Correct me if I am wrong)
|
If you can find paying customers, then yes.
| Quote: | Question 1
Why don't we enforce C++ standard on compilers?
|
Because there is no-one prepared to pay for enforcement. There was a
time that govenments required compilers to be validated against a
standard before being used for their contracts. They decided that the
costs outweighed the benefits.
| Quote: | Question 2
C++ is not exactly controlled by one company or person.
Who is expected to control C++?
Is it C++ standard committee? If not why does it not control?
|
The C++ standard is controlled by ISO. The ISO standards committee is
made up of national bodies (e.g. ANSI) representing individual
counties. The national bodies are represented by people that can spare
their time to work on the standard.
ISO is in the business of publishing and maintaining standards not of
enforcing adherence to its standards.
Note that the C++ standards activity is funded largely by individuals
donating their own time and expertise because they think it worthwhile.
A few lucky individuals are actually paid by their employer for their
efforts. In these cases the employer is a vendor of a C++ compiler or
library implementation.
Between family, paying work and other commitments I generally only
manage to passively follow discussions and contribute a couple of days
in a year. I'd love to do more, but unless some benefactor with a
large wallet comes along...
| Quote: | Question 3
Java world has come up with solid concept / specifications like J2EE
(or servlet JSP).
Why C++ committee does not try to setup groups for such technologies
that can help C++ grow?
|
One answer is that this is not the role of ISO.
Another is that creating a standard is an expensive way to develop a
library.
A third is that many of the same people that donate to the standards
effort also contribute to boost.
| Quote: | Question 4
Java C# give solid ready to use standard class framework C++ is far
behind. Why standard for such class framework is missing?
|
In both cases a single vendor was prepared to fund the development work
- they expected to make money as a result.
The ISO model is very different and, in practice at least, requires
that multiple vendors with very different priorities co-operate.
--
Alan Griffiths
http://www.octopull.demon.co.uk/
http://www.theoverloadset.co.uk/
http://www.accu.org/
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ] |
|
| Back to top |
|
 |
Francis Glassborow Guest
|
Posted: Fri Jul 07, 2006 3:07 am Post subject: Re: C++ standard |
|
|
In article <1152154738.922304.26650 (AT) b68g2000cwa (DOT) googlegroups.com>,
bestbrain (AT) gmail (DOT) com writes
| Quote: |
Java is same on every platform. If I write a java compiler or JVM, I
HAVE to confirm to java standard. IMHO it has helped JAVA to grow.
|
Well the name Java belongs to Sun Microsystems so they can control its
use in the context of computers (just as Microsoft can control the use
of 'Windows'). And the consistency isn't quite as good as you seem to
think.
| Quote: |
That's not the case with C++. Code which works perfect on SUN OS sun
CC may not even compile on Linux G++.
|
Yes, but only if you choose to use extensions. Conforming C++ compiles
everywhere though it might not always have the same results when the
program is run.
| Quote: | I can write my own compiler which does not stick to C++ standard and
still sell it as C++ compiler. (Correct me if I am wrong)
|
Yes, but at least in the UK, if you market it as a compiler for ISO C++
(or BSI C++) you can be dealt with for a breech of the Trade
Descriptions Act.
| Quote: |
Question 1
Why don't we enforce C++ standard on compilers?
Because no one has the authority to do so. |
| Quote: |
Question 2
C++ is not exactly controlled by one company or person.
Who is expected to control C++?
Is it C++ standard committee? If not why does it not control?
|
No one 'controls' it (and that is true of many other computer languages
such as Fortran) however WG21 is responsible for stating what
constitutes conforming C++ after that it is up to the laws of individual
countries to decide what ot do if a compiler does not conform.
| Quote: |
Question 3
Java world has come up with solid concept / specifications like J2EE
(or servlet JSP).
Why C++ committee does not try to setup groups for such technologies
that can help C++ grow?
|
Because we do not have the resources to do so even if we thought it
desirable. Have you noticed the problems caused by Java's continual
changes?
| Quote: |
Question 4
Java C# give solid ready to use standard class framework C++ is far
behind. Why standard for such class framework is missing?
|
That is a matter of opinion and one that not all of us buy into.
| Quote: |
I may have asked many stupid questions. (blame it on lack of C++
skills)
I hope I am not impolite in asking these questions.
They were honest questions but as is often the case they reveal quite a |
bit about the level of knowledge and understanding (nad not only of C++)
of the questioner.
--
Francis Glassborow ACCU
Author of 'You Can Do It!' and "You Can Program in C++"
see http://www.spellen.org/youcandoit
For project ideas and contributions: http://www.spellen.org/youcandoit/projects
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ] |
|
| Back to top |
|
 |
Jaunty Guest
|
Posted: Fri Jul 07, 2006 3:08 am Post subject: Re: C++ standard |
|
|
Firstly I would say that giving freedom to compilers a bit is a
blessing in disguise. Some compiler really provide very useful
deviation from the standard. Though It all depends on the programmer to
confrom to the standard if you want you code to be portable across
compilers and there are tools which will tell you if your code is not
confirming to standard). There is a C++ standard commitee and most of
the top notch compilers are trying to do there best with every new
release.
| Quote: | Question 1
Why don't we enforce C++ standard on compilers?
|
Since many compilers were out much before the C++ standards was formed
there are lots of disparities between compilers from different vendors.
And lots of code has already been written using compiler and they can
not just change all at once in there version to break all the legacy
code.
| Quote: | Question 2
C++ is not exactly controlled by one company or person.
Who is expected to control C++?
Is it C++ standard committee? If not why does it not control?
|
As far as I know the standards commitee is not a single person and it
is represented by lots of C++ gurus from different companies as well as
individuals.
| Quote: | Question 3
Java world has come up with solid concept / specifications like J2EE
(or servlet JSP).
Why C++ committee does not try to setup groups for such technologies
that can help C++ grow?
|
I can say that C++ is a platform and lot of frameworks can be built
upon it. Though some compilers gives there own framework over C++,
standard committe try to keep the standards minimal so that most of the
compilers can support it.
| Quote: | Question 4
Java C# give solid ready to use standard class framework C++ is far
behind. Why standard for such class framework is missing?
|
There are many ready made framework e.g. boost for C++. Again the same
question that many platform do not require those heavy frameworks so
not a part of standards.
Thanks,
Sanjay
bestbrain (AT) gmail (DOT) com wrote:
| Quote: | Java is same on every platform. If I write a java compiler or JVM, I
HAVE to confirm to java standard. IMHO it has helped JAVA to grow.
That's not the case with C++. Code which works perfect on SUN OS sun
CC may not even compile on Linux G++.
I can write my own compiler which does not stick to C++ standard and
still sell it as C++ compiler. (Correct me if I am wrong)
Question 1
Why don't we enforce C++ standard on compilers?
Question 2
C++ is not exactly controlled by one company or person.
Who is expected to control C++?
Is it C++ standard committee? If not why does it not control?
Question 3
Java world has come up with solid concept / specifications like J2EE
(or servlet JSP).
Why C++ committee does not try to setup groups for such technologies
that can help C++ grow?
Question 4
Java C# give solid ready to use standard class framework C++ is far
behind. Why standard for such class framework is missing?
I may have asked many stupid questions. (blame it on lack of C++
skills)
I hope I am not impolite in asking these questions.
|
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ] |
|
| Back to top |
|
 |
Walter Bright Guest
|
Posted: Fri Jul 07, 2006 3:17 am Post subject: Re: C++ standard |
|
|
bestbrain (AT) gmail (DOT) com wrote:
| Quote: | Java is same on every platform. If I write a java compiler or JVM, I
HAVE to confirm to java standard. IMHO it has helped JAVA to grow.
That's not the case with C++. Code which works perfect on SUN OS sun
CC may not even compile on Linux G++.
I can write my own compiler which does not stick to C++ standard and
still sell it as C++ compiler. (Correct me if I am wrong)
|
You are correct. C++ is not a trademarked term, but Java is (by Sun).
| Quote: | Question 1
Why don't we enforce C++ standard on compilers?
|
Enforcement of a standard requires:
1) C++ being trademarked
2) A C++ compiler validation procedure endorsed by whoever controls the
C++ trademark
C++ and C++ compilers existed for more than a decade before any C++
standard appeared. It would be unreasonable (and probably impossible) to
legally force existing C++ implementations off the market.
There are several C++ validation suites, but none of them are accepted
or endorsed by the C++ standard committee as official.
That said, C++ compilers steadily get more conformant because of market
pressures.
| Quote: | Question 2
C++ is not exactly controlled by one company or person.
Who is expected to control C++?
Is it C++ standard committee? If not why does it not control?
|
The C++ standard committee can only control their C++ standard document.
They can't control anything else because they do not have any trademark
control over the term "C++". Anyone can produce a document claiming to
be a "C++ standard". The only authority the C++ standards committee has
is simple acceptance by the C++ programming community. The day the C++
standards committee stops doing what the C++ programming community wants
is the day the committee ceases to have any relevance or authority.
| Quote: | Question 3
Java world has come up with solid concept / specifications like J2EE
(or servlet JSP).
Why C++ committee does not try to setup groups for such technologies
that can help C++ grow?
|
The C++ committee is composed of unpaid volunteers. The idea is that if
someone feels strongly that something should be done, they should step
up, volunteer, and provide the resources to get it done.
| Quote: | Question 4
Java C# give solid ready to use standard class framework C++ is far
behind. Why standard for such class framework is missing?
I may have asked many stupid questions. (blame it on lack of C++
skills)
I hope I am not impolite in asking these questions.
|
Not at all. They are good questions. Java and C++ have followed very,
very different language development models and paths to success. It's
interesting and instructive to compare them.
-Walter Bright
www.digitalmars.com C, C++, D programming language compilers
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ] |
|
| Back to top |
|
 |
Goalie_Ca Guest
|
Posted: Fri Jul 07, 2006 3:18 am Post subject: Re: C++ standard |
|
|
Here we go!!
bestbrain (AT) gmail (DOT) com wrote:
| Quote: | Java is same on every platform. If I write a java compiler or JVM, I
HAVE to confirm to java standard. IMHO it has helped JAVA to grow.
That's not the case with C++. Code which works perfect on SUN OS sun
CC may not even compile on Linux G++.
I can write my own compiler which does not stick to C++ standard and
still sell it as C++ compiler. (Correct me if I am wrong)
Question 1
Why don't we enforce C++ standard on compilers?
VC++ has issues with templates, MS also had issues with their java |
implementation but eventually went to court over it IIRC. As far as
embedded systems go i've actually had better luck with c++ than java.
| Quote: | From what i understand sun is a little too easy to release java certs
to vendors for phones because they want to establish the market. |
| Quote: | Question 2
C++ is not exactly controlled by one company or person.
Who is expected to control C++?
Is it C++ standard committee? If not why does it not control?
Yes, C++ is controlled by a committee. While this slows down its |
evolution it eliminates "corporate interest". It is really up to the
vendors to play nicely though.
| Quote: | Question 3
Java world has come up with solid concept / specifications like J2EE
(or servlet JSP).
Why C++ committee does not try to setup groups for such technologies
that can help C++ grow?
Well that would be outside of the scope of the committee. While TR1 and |
TR2 will have new functionality to make this stuff easier it is really
up to the 3rd party to come up and libraries and applications on their
own. Remember, C++ is a general purpose language.
| Quote: | Question 4
Java C# give solid ready to use standard class framework C++ is far
behind. Why standard for such class framework is missing?
Well... to be honest I don't think it was too high of a priority in |
past releases. In fact the next version of C++ will be geared towards
library improvements. Read about TR1 and TR2. For the time being check
out boost as a lot of the functionality is being based on the boost
libraries.
| Quote: | I may have asked many stupid questions. (blame it on lack of C++
skills)
I hope I am not impolite in asking these questions.
Asking questions is good. It gets people to think about things they |
have forgotten or assumed. I always like to stir up the pot myself ;)
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ] |
|
| Back to top |
|
 |
jbannon Guest
|
Posted: Fri Jul 07, 2006 7:09 pm Post subject: Re: C++ standard |
|
|
bestbrain (AT) gmail (DOT) com wrote:
| Quote: | Java is same on every platform. If I write a java compiler or JVM, I
HAVE to confirm to java standard. IMHO it has helped JAVA to grow.
That's not the case with C++. Code which works perfect on SUN OS sun
CC may not even compile on Linux G++.
I can write my own compiler which does not stick to C++ standard and
still sell it as C++ compiler. (Correct me if I am wrong)
|
Well, you could try! It wouldn't survive very long however. If you
advertise that your compiler is standard-conforming and it isn't then
you can bet you would have very angry customers on your hands as well
as possibly ending up in court on criminal charges depending on the
country you're selling in. Bottom line - it had better do what it says
on the tin.
Aside: I'm not a huge fan of commercial vendors anyway. I use the GCC
which, although not completely conformant for a variety of reasons, is
close enough for my purposes. One of these days I might get myself a
copy of Comeau but that's about as far as I would go.
| Quote: |
Question 1
Why don't we enforce C++ standard on compilers?
|
This has already been covered well enough by Francis and others.
Basically, it's not the job to the Standard comittee to enforce the
standard but to define the language and its basic facilities in
addition to codifying existing practice. What vendors do with that
definition is up to them, but see answers to the first part.
<rest snipped>
There is one really fundamental point of difference between Java and
C++ (besides design philosophy). Like C, C++ is designed to be run on a
variety of hardware platforms whereas Java is designed to be run on a
single "hardware" platform (the JVM). Indeed without the JVM, executing
a Java program would not be possible at all because the language is
intimately tied to the design of the machine. Similar remarks apply to
both J# and C#, escept that here it is the CLI that underpins the
language definition.
Best regards,
Jim Bannon
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ] |
|
| Back to top |
|
 |
Lally Guest
|
Posted: Fri Jul 07, 2006 7:13 pm Post subject: Re: C++ standard |
|
|
bestbrain (AT) gmail (DOT) com wrote:
| Quote: | [snip]
Question 4
Java C# give solid ready to use standard class framework C++ is far
behind. Why standard for such class framework is missing?
|
Actually, you'll notice that C++ apps tend to be 'natural' on the
platform they're implemented in, while Java apps always feel out of
place. That's because the standard class frameworks in Java (swing,
awt) make simplifying assumptions to implement the same APIs across all
the Java platforms.
As someone who's had to make portable Java code work on several
platforms (swt, swing, awt), I assure you that the basic assumption
that every window system works the same is absolutely false. Event
propagation, message handling, widget layering, layout, etc. very quite
a bit between platforms. Everry major platform vendor puts out a C++
API for their system, specifically because it's set up for their
platform. The Java toolkits attempt to approximate their model (e.g.
policies for event propagation, message handling, widget layer, layout,
etc) using the C/C++ API the vendor provides. The gap in between is
usually quite large.
This is why you'll notice that major Java desktop apps have a
compatability list for platforms. As a mac & linux user, I know to
look at those lists before downloading a large Java app.
Usually, that's what people are asking for in a standard class
framework -- something to do a graphical desktop app with. It's been
20+ years of commercial desktop development, so it's a fair question.
Yet you'll notice that there's still plenty of suck in libraries for
desktop app development -- most of them are still happy they figured
out model/view/controller! I don't mean to directly attack java here,
but Java's libraries are well known for their mediocrity. Yes, they've
got quantity, but the quality's never something you talk too much
about.
As for C++, you choose the libraries you want for your task. The truth
is that this works out better 99% of the time, as there are usually
important differences between them that can make or break your project.
Thanks to multiple inhertiance, you can use more than one library in
your application without having some utterly disgusting glue code to
put things together.
On the topic of the language itself -- outside of Visual C++ 6, the
compilers are going to comply with the language for most anything any
non-expert's going to do with it. There are smaller differences that
get in the way here and there, but it usually takes some advanced code
to bring those out. If you don't want to deal with that, just use g++.
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ] |
|
| Back to top |
|
 |
kanze Guest
|
Posted: Fri Jul 07, 2006 7:18 pm Post subject: Re: C++ standard |
|
|
Walter Bright wrote:
[Just a couple of nits...]
| Quote: | bestbrain (AT) gmail (DOT) com wrote:
|
[...]
| Quote: | Question 1
Why don't we enforce C++ standard on compilers?
Enforcement of a standard requires:
1) C++ being trademarked
2) A C++ compiler validation procedure endorsed by whoever controls the
C++ trademark
|
I suspect that there are legal means other than trademarks which
could also be used. (Which doesn't change your basic point, of
course. C++ doesn't have any of these legal means---Sun ensured
that it had them for Java.)
| Quote: | Question 2
C++ is not exactly controlled by one company or person.
Who is expected to control C++?
Is it C++ standard committee? If not why does it not control?
The C++ standard committee can only control their C++ standard document.
They can't control anything else because they do not have any trademark
control over the term "C++". Anyone can produce a document claiming to
be a "C++ standard".
|
I think that ISO is trademarked; it is at least protected in
some way, and not just anyone can publish something called an
ISO standard.
But it stops there. If I repackage a K&R C compiler, and claim
that it complies with the ISO C++ standard, ISO isn't going to
take any action. With something that blatant, of course, I may
get into trouble because of various truth in advertising laws.
And some countries may also have specific laws---a DIN standard
has a particular legal status in Germany, for example, and I
believe (although I'm far from sure) that it is illegal for you
to label a product X if there is a DIN standard for X, and you
are not conform. (If this is true, however, the law certainly
isn't enforced. The ISO C++ standard is also a DIN standard, so
technically, it would be illegal to label something a C++
compiler if it didn't support export.)
[...]
| Quote: | Question 4
Java C# give solid ready to use standard class framework C++ is far
behind. Why standard for such class framework is missing?
I may have asked many stupid questions. (blame it on lack of C++
skills)
I hope I am not impolite in asking these questions.
Not at all. They are good questions. Java and C++ have
followed very, very different language development models and
paths to success. It's interesting and instructive to compare
them.
|
Since no one else has mentionned it, I will point out one
particular difference, and the consequences. Java rigorously
defines the size and formats of its basic types; C++ doesn't.
The result is that you do have to pay more attention in C++ if
you want to avoid implementation dependencies. Another result
is that an efficient implementation of Java is impossible on
some platforms. C++ tries to permit efficient implementations
on all reasonable hardware. If you have to target that 36 bit
1's complement machine that is still being sold, C++ has a
definite advantage:-).
--
James Kanze GABI Software
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ] |
|
| Back to top |
|
 |
Stephen M. Webb Guest
|
Posted: Sat Jul 08, 2006 4:51 am Post subject: Re: C++ standard |
|
|
bestbrain (AT) gmail (DOT) com wrote:
| Quote: | [...]
Question 3
Java world has come up with solid concept / specifications like J2EE
(or servlet JSP).
Why C++ committee does not try to setup groups for such technologies
that can help C++ grow?
|
C++ is used for far more software than is Java. Perhaps one should
examine what it was about C++ that made it grow and could be applied to
benefit Java?
| Quote: | Question 4
Java C# give solid ready to use standard class framework C++ is far
behind. Why standard for such class framework is missing?
|
See, C++ is a technology, a tool. Java is a solution. Comparing the
two is much like comparing apples and fruitbaskets.
--smw
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ] |
|
| Back to top |
|
 |
Walter Bright Guest
|
Posted: Sat Jul 08, 2006 4:55 am Post subject: Re: C++ standard |
|
|
kanze wrote:
| Quote: | Walter Bright wrote:
The C++ standard committee can only control their C++ standard document.
They can't control anything else because they do not have any trademark
control over the term "C++". Anyone can produce a document claiming to
be a "C++ standard".
I think that ISO is trademarked; it is at least protected in
some way, and not just anyone can publish something called an
ISO standard.
But it stops there. If I repackage a K&R C compiler, and claim
that it complies with the ISO C++ standard, ISO isn't going to
take any action. With something that blatant, of course, I may
get into trouble because of various truth in advertising laws.
|
I think ISO could take legal action against someone claiming to have an
"ISO IEC 14882-1998 C++ compiler" that didn't support export. But not a
"C++ compiler".
| Quote: | And some countries may also have specific laws---a DIN standard
has a particular legal status in Germany, for example, and I
believe (although I'm far from sure) that it is illegal for you
to label a product X if there is a DIN standard for X, and you
are not conform. (If this is true, however, the law certainly
isn't enforced. The ISO C++ standard is also a DIN standard, so
technically, it would be illegal to label something a C++
compiler if it didn't support export.)
|
There is the possibility that if one sells a "C++ compiler" that is
actually a vacuum cleaner, one could be prosecuted for fraud. On the
other hand, the absence of any official C++ test suite means that nobody
can prove any C++ compiler to be standards compliant, and I suspect any
legal case against a non-conformant compiler would fall apart on that basis.
Doesn't Sun have some official validation suite for Java?
| Quote: | Since no one else has mentionned it, I will point out one
particular difference, and the consequences. Java rigorously
defines the size and formats of its basic types; C++ doesn't.
The result is that you do have to pay more attention in C++ if
you want to avoid implementation dependencies. Another result
is that an efficient implementation of Java is impossible on
some platforms. C++ tries to permit efficient implementations
on all reasonable hardware. If you have to target that 36 bit
1's complement machine that is still being sold, C++ has a
definite advantage:-).
|
PDP-10's became obsolete years before C++ appeared on the scene. I think
the C++ community would be well served by statements in the Standard
along the lines of "if it's a 32 bit CPU, then int shall be 32 bits,
etc." That would bless current existing practice into something that
could be relied upon.
That said, I believe the single biggest obstacle to C++ library
production is the lack of garbage collection. Every C++ shop seems to
evolve towards its own peculiar methodology to managing memory, meaning
that getting one 3rd party library to play well with another is a big
problem. And then, of course, there's simply the vast amount of effort
expended in any C++ library trying to manage memory. The Boehm
collector, while effective, cannot be relied upon by library vendors
because it isn't part of the standard, making it only useful for
"island" projects.
-Walter Bright
www.digitalmars.com C, C++, D programming language compilers
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ] |
|
| Back to top |
|
 |
Goalie_Ca Guest
|
Posted: Sat Jul 08, 2006 4:55 am Post subject: Re: C++ standard |
|
|
QT Programs generally turn out pretty well. Of course no generic gui
toolkit feels quite "native" on macs . QT is a C++ framework :D
Lally wrote:
| Quote: | bestbrain (AT) gmail (DOT) com wrote:
[snip]
Question 4
Java C# give solid ready to use standard class framework C++ is far
behind. Why standard for such class framework is missing?
Actually, you'll notice that C++ apps tend to be 'natural' on the
platform they're implemented in, while Java apps always feel out of
place. That's because the standard class frameworks in Java (swing,
awt) make simplifying assumptions to implement the same APIs across all
the Java platforms.
As someone who's had to make portable Java code work on several
platforms (swt, swing, awt), I assure you that the basic assumption
that every window system works the same is absolutely false. Event
propagation, message handling, widget layering, layout, etc. very quite
a bit between platforms. Everry major platform vendor puts out a C++
API for their system, specifically because it's set up for their
platform. The Java toolkits attempt to approximate their model (e.g.
policies for event propagation, message handling, widget layer, layout,
etc) using the C/C++ API the vendor provides. The gap in between is
usually quite large.
This is why you'll notice that major Java desktop apps have a
compatability list for platforms. As a mac & linux user, I know to
look at those lists before downloading a large Java app.
Usually, that's what people are asking for in a standard class
framework -- something to do a graphical desktop app with. It's been
20+ years of commercial desktop development, so it's a fair question.
Yet you'll notice that there's still plenty of suck in libraries for
desktop app development -- most of them are still happy they figured
out model/view/controller! I don't mean to directly attack java here,
but Java's libraries are well known for their mediocrity. Yes, they've
got quantity, but the quality's never something you talk too much
about.
As for C++, you choose the libraries you want for your task. The truth
is that this works out better 99% of the time, as there are usually
important differences between them that can make or break your project.
Thanks to multiple inhertiance, you can use more than one library in
your application without having some utterly disgusting glue code to
put things together.
On the topic of the language itself -- outside of Visual C++ 6, the
compilers are going to comply with the language for most anything any
non-expert's going to do with it. There are smaller differences that
get in the way here and there, but it usually takes some advanced code
to bring those out. If you don't want to deal with that, just use g++.
|
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ] |
|
| Back to top |
|
 |
Guest
|
Posted: Sat Jul 08, 2006 4:56 am Post subject: Re: C++ standard |
|
|
Hi,
| Quote: | Question 3
Java world has come up with solid concept / specifications like J2EE
(or servlet JSP).
Why C++ committee does not try to setup groups for such technologies
that can help C++ grow?
|
There are standard technologies defined by the OMG (Object Managment
Group) that are widely used and have C++ bindings. An example is the
CORBA Component Model (CCM) and CORBA.
For more informaiton on CORBA, please look at:
http://www.cs.wustl.edu/~schmidt/corba-overview.html
| Quote: | Question 4
Java C# give solid ready to use standard class framework C++ is far
behind. Why standard for such class framework is missing?
|
There are many solid frameworks for C++, however they are not part of
the C++ standard. In particular, one of the most portable C++
frameworks is the ADAPTIVE Communication Environment (ACE). For more
information on ACE please look at:
http://www.cs.wustl.edu/~schmidt/ACE-overview.html
ACE/TAO are widely used in the commercial industry. For a list of some
Companies that are using it, please look at:
http://www.cs.wustl.edu/~schmidt/ACE-users.html
I hope this helps,
Abdul
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ] |
|
| Back to top |
|
 |
Lally Guest
|
Posted: Sun Jul 09, 2006 4:28 am Post subject: Re: C++ standard |
|
|
Goalie_Ca wrote:
| Quote: | QT Programs generally turn out pretty well. Of course no generic gui
toolkit feels quite "native" on macs . QT is a C++ framework
|
The cross-platform toolkits are best left when you know your app:
1. will have little UI work
2. will _certainly_ not require any custom widgets
Custom widget development & debugging on multiple platforms is a real
pain. If it's just a little amount, then it's tolerable. But there's
a low threshold before you're better off writing custom UIs for each
platform.
Qt's ok in most regards, and would be one of my top 3 choices for a
cross-platform UI app.
Walter Bright wrote:
| Quote: | That said, I believe the single biggest obstacle to C++ library
production is the lack of garbage collection. Every C++ shop seems to
evolve towards its own peculiar methodology to managing memory, meaning
that getting one 3rd party library to play well with another is a big
problem. And then, of course, there's simply the vast amount of effort
expended in any C++ library trying to manage memory. The Boehm
collector, while effective, cannot be relied upon by library vendors
because it isn't part of the standard, making it only useful for
"island" projects.
|
C++ can certainly use more memory management options. But I've been
bitten enough by Java's GC to know it's certainly not a copy-paste
answer. Perhaps a few options that decide which operator new() runs?
GC for some things, Obj-C's autorelease pools for others, STL custom
allocators for others, and normal manual memory mgmt for everything
else.
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ] |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|