473,404 Members | 2,179 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Why doesn't C++ have comprehensive API like Java? (Cont'd.)

I'm posting a new message regarding this subject,
since the one posted previously is getting rather
large. I just received the June 2005 issue of
Dr. Dobb's Journal, and it contains an article
titled "The Technical Report On C++ Library
Extensions". After debating this issue with
various group members, all I can say is:
I Win!!! (Just kidding)

Anyway, here are a couple of quotes from the article,
which reflect my sentiments exactly:

"The Perl, Python, and Java standard libraries include
facilities for parsing XML, performing regular
expression searches, manipulating image files, and
sending data over the network. From that perspective,
the C++ standard library looks like it's only the
beginning. And everyone in the standards committee knows
that of course."
"The question isn't whether we need a more comprehensive
library, but how we get one".
Jul 23 '05 #1
30 1925
somebody wrote:
...I just received the June 2005 issue of
Dr. Dobb's Journal, and it contains an article
titled "The Technical Report On C++ Library
Extensions"... "The Perl, Python, and Java standard libraries include
facilities for parsing XML, performing regular
expression searches, manipulating image files, and
sending data over the network. From that perspective,
the C++ standard library looks like it's only the
beginning. And everyone in the standards committee knows
that of course."


The distinction is systems like XML are also themselves standards (actually
"recommendations"), so they already have cross-platform support.

The C++ Standard Library will probably expand, and that's what the C++
thought leaders invest in Boost.org. However, there are no equivalent widely
adopted recommendations for GUIs. Such a "standard" would be Jack of All
Trades, Master of None. The C++ Standard Library will not enforce a GUI any
time soon.

Again: What is the point of letting some dumb committee somewhere decide for
you which GUI to use?

--
Phlip
http://www.c2.com/cgi/wiki?ZeekLand
Jul 23 '05 #2
somebody wrote:
"The Perl ... standard libraries include
facilities for parsing XML


I couldn't let that one past.

Perl has no XML "standard" anything. It only has a smattering buggy,
half-started modules thrown onto CPAN.

(Ruby, by contrast, has a coherent and fully useful XML library, bundled
with its core distribution.;)

--
Phlip
http://www.c2.com/cgi/wiki?ZeekLand

Jul 23 '05 #3
"Phlip" <ph*******@yahoo.com> scribbled on the stall wall:
somebody wrote:
"The Perl ... standard libraries include
facilities for parsing XML


I couldn't let that one past.

Perl has no XML "standard" anything. It only has a smattering buggy,
half-started modules thrown onto CPAN.

(Ruby, by contrast, has a coherent and fully useful XML library, bundled
with its core distribution.;)

God, I miss FORTRAN IV...

"A real programmer can write FORTRAN code in any language." -- Real Programmers
Dont Use Pascal, DATAMATION, July 1983.

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Jul 23 '05 #4
On Tue, 03 May 2005 22:15:43 +0000, Phlip wrote:
The distinction is systems like XML are also themselves standards (actually
"recommendations"), so they already have cross-platform support.

The C++ Standard Library will probably expand, and that's what the C++
thought leaders invest in Boost.org. However, there are no equivalent widely
adopted recommendations for GUIs. Such a "standard" would be Jack of All
Trades, Master of None. The C++ Standard Library will not enforce a GUI any
time soon.

Again: What is the point of letting some dumb committee somewhere decide for
you which GUI to use?

I'm not concerned with GUI development. All of the other items mentioned,
like regular expressions, network classes, imgage manipulation, etc.,
are what I'm referring to. These could be added as library extensions,
without bloating the core C++ classes. You use them if you want to.

Jul 23 '05 #5
somebody wrote:

I'm not concerned with GUI development. All of the other items mentioned,
like regular expressions, network classes, imgage manipulation, etc.,
are what I'm referring to. These could be added as library extensions,
without bloating the core C++ classes. You use them if you want to.


Image manipulation in the C++ Standard? Dream on.

More to the point: everything that's in the standard has to be provided
by every compiler vendor for every platform. Doesn't matter whether you
want to use them -- they have to be there. That means you pay more for
the compiler. (I don't mind: that's how we make our living.)

--

Pete Becker
Dinkumware, Ltd. (http://www.dinkumware.com)
Jul 23 '05 #6
somebody wrote:
I'm not concerned with GUI development. All of the other items mentioned,
like regular expressions,
Needed for string manipulation.
network classes, imgage manipulation, etc.,

Image manipulation does not make sense in embedded devices like watering systems, or
telephone centres. So, it will not be added in the standard. I am not sure networking will
make it too in the end.

This does not mean you can not do image manipulation or networking with C++. For example
these days I am reading about .NET networking facilities, and have read about its 2D
graphics facilities in the past.
Do not confuse a language (syntax) with a platform. In essence, Java the language comes
with no facilities of its own, the facilities are of the JVM platform.
In contrast C++ uses the facilities of a platform (e.g. .NET) *and* comes with its own
library.

are what I'm referring to. These could be added as library extensions,
without bloating the core C++ classes. You use them if you want to.

Yes. However the standard library is required to be implemented in all C++ implementations
and the facilities that are added are the most needed, generic and efficient ones. And C++
is not only an application development language but also a systems programming language
(you can program the bare metal).

In contrast with Java you are programming applications for the Java Virtual Machine, but
you can not write the Java Virtual Machine with Java.

--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 23 '05 #7
somebody wrote:
I'm not concerned with GUI development. All of the other items mentioned,
like regular expressions, network classes, imgage manipulation, etc.,
are what I'm referring to.


Which network? Berkeley sockets? Samba? ATM? Ethernet?

--
Phlip
http://www.c2.com/cgi/wiki?ZeekLand
Jul 23 '05 #8
On Wed, 04 May 2005 01:44:26 +0000, Phlip wrote:
somebody wrote:
I'm not concerned with GUI development. All of the other items mentioned,
like regular expressions, network classes, imgage manipulation, etc.,
are what I'm referring to.


Which network? Berkeley sockets? Samba? ATM? Ethernet?

The way Java or Perl handles them.

Jul 23 '05 #9
On Wed, 04 May 2005 04:26:47 +0300, Ioannis Vranos wrote:
In contrast with Java you are programming applications for
the Java Virtual Machine, but
you can not write the Java Virtual Machine with Java.


Yes, good point. I would still like to see extensive library
extension additions for C++, making it a more comprehensive
language for application programming. As it stands, you need
a framework like Visual C++ or wxWidgets to be productive.
Jul 23 '05 #10
somebody wrote:

Yes, good point. I would still like to see extensive library
extension additions for C++, making it a more comprehensive
language for application programming. As it stands, you need
a framework like Visual C++ or wxWidgets to be productive.

You always need a platform (framework) for application programming. Java just targets a
specific one (JVM).
If JVM was not closed to other languages (it is a proprietary, closed virtual machine),
all languages would be able to target it including C++.

..NET on the other hand is a virtual machine open to all languages. Actually, there is a
standard (initiated by Microsoft) called CLI, which provides the specification of a VM
together with its assembly language, which is available from here:

http://www.ecma-international.org/pu...s/Ecma-335.htm

..NET is a CLI-compliant VM, and there are other CLI-compliant machines like Mono and DotGNU.
CLI compliant VMs:

http://msdn.microsoft.com/netframework

http://www.mono-project.com

http://www.gnu.org/projects/dotgnu
Code that uses the same APIs in two CLI VMs is *binary* portable to both of them (so for
example the executable of .NET code can run unchanged under Mono, as far as it uses common
APIs).

Mono provides many of .NET APIs as also as some of its own.

So a GUI Form .NET application can run as it is under Mono in Linux, Mac OS X, etc (or in
Windows - Mono provides a Mono implementation (VM) for Windows themselves which anyone can
download and install, as you can download and install the JVM ("Java")).
--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 23 '05 #11
somebody wrote:
The way Java or Perl handles them.

What you must understand is that development is not the same for everything. There is
application development for PCs, OS development, dedicated-system development (a dedicated
application running directly on hardware like an alarm system), etc.
There are different types of networking (and actually everything), that you can not
provide in a library or in a VM.
You can't include *everything* in something. So when you program in a platform, you use
the platforms features.
When you program for the JVM you use the facilities that JVM provides. In turn, JVM
provides the common facilities of most Operating Systems of *PCs*.
My C++ .NET applications, use the facilities that the .NET VM provides (garbage
collection, GUI etc), which in turn are the most facilities that the Windows OS provides.
Mono on the other hand, does not provide all .NET facilities (like Managed DirectX), but
many of them since it tries to stick with the common features of many OSes (Windows, Mac
OS X, etc) as also some additional facilities of its own (like GTK#).
Once again, in my .NET C++ applications I have garbage collection, since it is a feature
of the VM I am programming for. Another feature I have is every object inheriting from a
base class Object, since it is a feature provided by the .NET VM.

--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 23 '05 #12
"somebody" <so**@body.com> wrote in message news:pa****************************@body.com...

[...]

"The Perl, Python, and Java standard libraries include
facilities for parsing XML, performing regular
expression searches, manipulating image files, and
sending data over the network. From that perspective,
the C++ standard library looks like it's only the
beginning. And everyone in the standards committee knows
that of course."

"The question isn't whether we need a more comprehensive
library, but how we get one".


Have a look at the article by Bjarne Stroustrup (referenced by the man himself in a post to this ng):
http://www.research.att.com/~bs/rules.pdf. It refers to the upcoming revision of the ISO C++ standard (C++0x) and
addresses many of the issues you raise.

--
Lionel B

Jul 23 '05 #13
"Ioannis Vranos" writes:
Image manipulation does not make sense in embedded devices like watering
systems, or telephone centres. So, it will not be added in the standard.


A watering system doesn't need exp(x) either. But some compilers offer this
exotic capability. How does this fit in with your theory of needs vs.
wants?
Jul 23 '05 #14

"osmium" <r1********@comcast.net> skrev i en meddelelse
news:3d*************@individual.net...
"Ioannis Vranos" writes:
Image manipulation does not make sense in embedded devices like watering
systems, or telephone centres. So, it will not be added in the standard.


A watering system doesn't need exp(x) either. But some compilers offer
this exotic capability. How does this fit in with your theory of needs
vs. wants?

Are you sure? All my watering systems have had good use of exp ;-)
Seriously, an imaging system certainly is less applicability than exp. Also
exp is rather well defined whereas "imaging system" is quite unclear. What
kind of pictures, what requirements a.s.o.
Also exp might need some non-portable library support to implement it
optimally.

/Peter
Jul 23 '05 #15
osmium wrote:
A watering system doesn't need exp(x) either. But some compilers offer this
exotic capability. How does this fit in with your theory of needs vs.
wants?


I think there is a confusion regarding C++ standard libraries vs JVM/.NET/Some_OS dynamic
(run-time) libraries (dlls).

--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 23 '05 #16
On Wed, 04 May 2005 07:18:44 +0300, Ioannis Vranos wrote:
somebody wrote:
The way Java or Perl handles them.

What you must understand is that development is not the same for everything. There is
application development for PCs, OS development, dedicated-system development (a dedicated
application running directly on hardware like an alarm system), etc.


Yes, and wouldn't C++ be fantastic if you could do systems programming,
PLUS have all of the functionality of Java? That's what I want.

Jul 23 '05 #17
somebody wrote:
On Wed, 04 May 2005 07:18:44 +0300, Ioannis Vranos wrote:
somebody wrote:
The way Java or Perl handles them.

What you must understand is that development is not the same for
everything. There is application development for PCs, OS development,
dedicated-system development (a dedicated application running directly on
hardware like an alarm system), etc.


Yes, and wouldn't C++ be fantastic if you could do systems programming,
PLUS have all of the functionality of Java? That's what I want.


It can. You just need the right libraries (think of them as supplementing
C++). Java is just a language plus a framework that provides you with all
the "libraries". C++ does this but you usually need to obtain the libraries
yourself.
Jul 23 '05 #18
somebody wrote:
Yes, and wouldn't C++ be fantastic if you could do systems programming,
PLUS have all of the functionality of Java? That's what I want.


By "have all of the functionality", you are saying "comes bundled with".
Java's vendor is Sun.

When you get a C++ platform, it also comes bundled with plenty of libraries.
All the functionality. C++, however, has the added benefit of multiple,
competing vendors, not just Sun.

Competition is Good. For example, Java started with AWT, a sucky GUI
library. They since switched to Swing. So would you like all C++
distributions to bundle a sucky GUI library too? Or are the ISO Committees
somehow prescient enough to order those wacky C++ distributors to supply The
One True Perfect GUI? A GUI so good it deserves the support of international
law?

Oops, sorry everyone. The ISO Committees got it wrong again. We need to
upgrade from C++AWT to C++Swing. Yeah, that's the ticket!

Now what technical problem, on your desktop, are you actually trying to
solve? Or are you imaging a problem?

--
Phlip
http://www.c2.com/cgi/wiki?ZeekLand
Jul 23 '05 #19
somebody wrote:
Yes, and wouldn't C++ be fantastic if you could do systems programming,
PLUS have all of the functionality of Java? That's what I want.

Who said you can't? What I have been saying all along? :-) My .NET applications have
garbage collection, all objects inheriting from a base class Object and thus I can do:
int x= 7;

String *p= x.ToString();
run-time generics (in .NET 2), templates, etc. However not all of these are suitable or
feasible for systems programming, that's why Standard C++ comes with what is suitable and
feasible on its own (and that's why Java is not suitable for systems programming).

--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 23 '05 #20
Ioannis Vranos wrote:
Who said you can't? What I have been saying all along? :-) My .NET
applications have garbage collection, all objects inheriting from a base
class Object and thus I can do:
int x= 7;

String *p= x.ToString();
run-time generics (in .NET 2), templates, etc. However not all of these
are suitable or feasible for systems programming, that's why Standard
C++ comes with what is suitable and feasible on its own (and that's why
Java is not suitable for systems programming).

To bring it in the Java context, a C++ compiler for the JVM would have the same access to
all JVM features, that Java the language (the syntax) currently has. However JVM is
proprietary and its company does not let anyone make a C++ (or Fortran or whatever)
compiler for it.

--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 23 '05 #21
I thought you could do socket programming in C++ you just have to use C
syntax and libraries for it.

~Justin
"Phlip" <ph*******@yahoo.com> wrote in message
news:_N**************@newssvr33.news.prodigy.com.. .
somebody wrote:
I'm not concerned with GUI development. All of the other items
mentioned,
like regular expressions, network classes, imgage manipulation, etc.,
are what I'm referring to.


Which network? Berkeley sockets? Samba? ATM? Ethernet?

--
Phlip
http://www.c2.com/cgi/wiki?ZeekLand

Jul 23 '05 #22
Justin Naidl wrote:
I thought you could do socket programming in C++ you just have to use C
syntax and libraries for it.

These days I am studying .NET networking, TCP/IP stream-socket based, and UDP
connectionless datagrams. Both with .NET classes and not "C syntax and libraries".

In other words it depends on the platform and you can find OO APIs and libraries to work with.
--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 23 '05 #23
Justin Naidl wrote:
I thought you could do socket programming in C++ you just have to use C
syntax and libraries for it.


The OP doesn't seem to understand we are discussing two distinct things: The
C++ Standard, and your C++ implementation.

The Standard only contains the most common things that must work everywhere,
such as file handles.

You describe Berkeley Sockets, which are probably part of POSIX. That's
_another_ Standard, which your C++ implementation _might_ provide.

Note that a real language lawyer could nail down all those specifics better
than me. The point remains, C++ _has_ comprehensive libraries, just like
Java.

--
Phlip
http://www.c2.com/cgi/wiki?ZeekLand
Jul 23 '05 #24
Ioannis Vranos <iv*@remove.this.grad.com> wrote:
To bring it in the Java context, a C++ compiler for the JVM would have the same access to
all JVM features, that Java the language (the syntax) currently has. However JVM is
proprietary and its company does not let anyone make a C++ (or Fortran or whatever)
compiler for it.


Nonsense.

Anyone is free to write a compiler that emits Java bytescodes which
will run on the Java virtual machine. Sun even documents the
bytecodes openly and freely. Many such compilers already exist, such
as Jython, which is a Python compiler that emits Java bytecodes.
Jul 23 '05 #25
Ioannis Vranos <iv*@remove.this.grad.com> wrote:
If JVM was not closed to other languages (it is a proprietary, closed virtual machine),
all languages would be able to target it including C++.


Nonsense.

The JVM is not "closed to other languages". There are compilers
available that target the JVM but don't require you to use Java, such
as Jython, a Python compiler that emits Java bytecodes.

The Sun implementation of the JVM is closed and proprietary, but there
are also open implementations, such as GNU's classpath.

Lastly, there's no non-trivial C++ program that would compile and run
unchanged on Microsoft's .NET CLR. You have to use a limited and
bastardized version of C++.
Jul 23 '05 #26
Ed Jensen wrote:
Ioannis Vranos <iv*@remove.this.grad.com> wrote:
To bring it in the Java context, a C++ compiler for the JVM would have the same access to
all JVM features, that Java the language (the syntax) currently has. However JVM is
proprietary and its company does not let anyone make a C++ (or Fortran or whatever)
compiler for it.

Nonsense.

Anyone is free to write a compiler that emits Java bytescodes which
will run on the Java virtual machine. Sun even documents the
bytecodes openly and freely. Many such compilers already exist, such
as Jython, which is a Python compiler that emits Java bytecodes.


even further nonsense...

the JVM spec is public too, so anyone can write their own JVM (as lots
have - IBM, SmallTalk, etc..)

http://java.sun.com/docs/books/vmspe...ecTOC.doc.html
Jul 23 '05 #27
Ed Jensen wrote:
Nonsense.

The JVM is not "closed to other languages". There are compilers
available that target the JVM but don't require you to use Java, such
as Jython, a Python compiler that emits Java bytecodes.

OK, then there has been no interest of a C++ compiler vendor to produce a JVM compiler. In
any case, we should not confuse between Java the syntax and the facilities of the JVM.

The Sun implementation of the JVM is closed and proprietary, but there
are also open implementations, such as GNU's classpath.

Lastly, there's no non-trivial C++ program that would compile and run
unchanged on Microsoft's .NET CLR. You have to use a limited and
bastardized version of C++.

*Any* ISO C++ program can compile and run unchanged under .NET, as native code of course.

Naturally, all .NET features are accessible as system extensions. That is, ISO C++ is one
thing (the same as with any platform, *unmanaged* and source portable), and .NET features
are another thing (intermediate bytecode, garbage collection, .NET types, etc).

If you want to have a pure managed program, you can stick with .NET features only.
This is not a "limited version of C++", any limits are .NET limits (no multiple
inheritance but interfaces only, etc). ISO C++ code under .NET has not such limits of
course (because it is unmanaged, native code). When using .NET facilities, you get .NET
limitations in them (only), when you do not use them you do not get any limitations.

--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 23 '05 #28
Andrew McDonagh wrote:
even further nonsense...

the JVM spec is public too, so anyone can write their own JVM (as lots
have - IBM, SmallTalk, etc..)

http://java.sun.com/docs/books/vmspe...ecTOC.doc.html

OK, then there has been no interest of any C++ compiler vendor to produce a JVM compiler.

In any case, we should not confuse between Java the syntax and the facilities of the JVM.

--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 23 '05 #29
Ioannis Vranos <iv*@remove.this.grad.com> wrote:
*Any* ISO C++ program can compile and run unchanged under .NET, as native code of course.
Which is of dubious value, in my opinion. C++ users don't need .NET,
because C++ compilers are available for just about any platform you
choose to target.
Naturally, all .NET features are accessible as system extensions. That is, ISO C++ is one
thing (the same as with any platform, *unmanaged* and source portable), and .NET features
are another thing (intermediate bytecode, garbage collection, .NET types, etc).

If you want to have a pure managed program, you can stick with .NET features only.


That's when you start using a bastardized version of C++, which isn't
really C++.
Jul 23 '05 #30
Ed Jensen wrote:
*Any* ISO C++ program can compile and run unchanged under .NET, as native code of course.

Which is of dubious value, in my opinion. C++ users don't need .NET,
because C++ compilers are available for just about any platform you
choose to target.

I am not sure I can understand your point. .NET is a platform. If you want to write .NET
applications you use .NET facilities, if you want to write QT GNU/Linux applications you
use QT, etc.

If you want to have a pure managed program, you can stick with .NET features only.

That's when you start using a bastardized version of C++, which isn't
really C++.

More accurately we can say that when you stick with .NET features only, you are writing
non-portable code to other(non-CLI) environments.

As is the case of non-portable code if you stick with Win32 API only features, QT, MFC, etc.

In my .NET applications I am using ISO C++ extensively, like string, vector, etc.

--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 23 '05 #31

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

31
by: somebody | last post by:
No, I'm not a troll, just angry. I just started learning C++, and find it extremely lacking compared to Java. For example, I had to write my own functions to do something as simple as a case...
2
by: . . | last post by:
Hi I need some help with java script . I have a ASPX page that is pulling a user message heading from the table on the page . The user message header has message body which suppose to dispay...
3
by: MBReikowsky | last post by:
Ok this is homework, and I have wrestled with this for quite awhile now. My program is supposed to give an error message if the user enters any invalid entries. The program works great when the user...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.