Artie Gold wrote:
[color=blue]
> Steven T. Hatton wrote:[/color]
[color=blue][color=green]
>> I guess I'm missing your point. Since this is done to the exclusion of
>> all else in both Java and C#, and they are certainly viable, why would a
>> judicious mix of these heavier classes and concrete C++ classes present a
>> problem? Part of the slowness in Java apps is not due to inherent
>> slowness of Java, it's due to the design philosophy used by most Java
>> programmers unwaveringly. Java3D is pretty snappy.
>>
>> There may actually be cases where this kind of design performs better
>> than
>> traditional C++ designs. For instance, there may be more opportunity to
>> compose functions.[/color]
>
> Sure. Nothing in my argument has to do with what language or approach is
> better. Different languages occupy different spaces, provide different
> idioms, do different things well. Just because you *can* sharpen the
> edge of a hammer, it doesn't mean that using it to cut is a good idea.
> If you need a knife, use a knife![/color]
I believe you missed my point about composition closure objects. You could
not do that with normal member functions, though you may be able to with
function object class members. That would mean better performance than you
would get by using regular C++ member functions.
Arguments such as "this is not the design philosophy of C++", etc., are not
applicable to software built with C++. That is the design philosophy of
the language. It is meant to give the programmer the choice to implement
less efficient, but more useful and/or safer means of accomplishing tasks.
The argument that the proposed approach would carry an excessive burden
cannot be sustained as a general principle. There are many cases when the
kinds of performance enhancements gained by eliminating all virtual
functions (something you can do in Java as well) in a class are negligible
in comparison to what else is going on. Virtual inheritance is what is most
likely to be the biggest performance hit.
But pointers to member functions are not very efficient, and I'm not aware
of anybody suggestion I should avoid using mem_fun for that reason.
[color=blue][color=green]
>>
http://www.research.att.com/~bs/bs_faq.html#why
>> Why did you invent C++?
>> "I wanted to write efficient systems programs in the styles encouraged by
>> Simula67. To do that, I added facilities for better type checking, data
>> abstraction, and object-oriented programming to C. The particular
>> projects that prompted this work had to do with distributing operating
>> system facilities across a network. The more general aim was to design a
>> language in which I could write programs that were both efficient and
>> elegant. Many languages force you to choose between those two
>> alternatives.
>>
>> The specific tasks that caused me to start designing and implementing C++
>> (initially called "C with Classes") had to do with the design of a
>> distributed operating system."
>>
>> Note well that the place where Java has most effectively competed with
>> C++
>> is in distributed systems. EJB, etc.[/color]
>
> Erm, look at the quote again. Notice that it says "distributed
> *operating* system". Different animal.
>
> Cheers,
> --ag[/color]
"Distributed operating system facilities". I'd say thread scheduling, file
transfer, file sharing, identity authorization and access control,
encryption, clustering, load balancing, RPC (remote procedure calls)
(remote method invocation or RMI in Java) etc., are distributed operating
system facilities. Also bear in mind that the concept of "a distributed
operating system" is really not where distributed computing has gone. Sure
there are distributed processing grids such as Beowulf clusters. Java
doesn't seem to have much of a role in that arena. But the kinds of
intersystem communications that merge several heterogeneous data sources
into a single coherent view, are definitely in Java's domain.
--
If our hypothesis is about anything and not about some one or more
particular things, then our deductions constitute mathematics. Thus
mathematics may be defined as the subject in which we never know what we
are talking about, nor whether what we are saying is true.-Bertrand Russell