[VSDK] SetCompareFunction()

Ruslan Zasukhin sunshine at public.kherson.ua
Sat Nov 15 10:02:32 CST 2003


on 11/15/03 12:29 AM, Eric Forget at forgete at cafederic.com wrote:

Hi Eric,

>> Eric, for example in Valentina 2.0 we have about 50 (!!!) Interface classes.
>> If wrap all this into C functions and then again make 50 classes around that
>> C functions?!
>> 
>> No. this is nightmare for support.
> 
> You think you do not have a nightmare right now with all those frameworks
> you have to support? And you don't even support framework for CW.

This is just question of recompile.

Again, I CAN EASY add framework with C language.
No problems. And yes, this SINGLE framework will cover all compilers.

What I mean with support is: that adding of any new function into kernel,
By your scheme will require cascade changes in C framework sources and in
the top C++ wrapper. I have had such situation in VDK classes of Valentina
1.x. I have just ONE wrapper around kernel and this was so hard to add new
features to kernel and wrapper.

> You know, I say that to help, from my experience. I have done that in the
> past for a lot of classes. With about the same size you will have for
> version 2.0.
> 
> The only thing you need to do is to create a database (hey, you should know
> how to doing it!) to enter all the classes and their functions. From their
> you generate:
> 
>   - C export function (.c and .h): inside framework
>   - C Interface file (.h): for outside framework user
> 
> And then
>   - C++ wrapper (.cpp and .h): they may throw C++ exception
>   - Objective-C (.m and .h): they may throw Objective-C exception
>   - Java (.java): they may throw Java exception
>   - Perl
>   - TCL
>   - Phyton
>   - etc.
> 
> Once, you have made the export stuff for one language, it is supported
> easily for all new versions: just export again.

Idea sounds interesting...just I still not sure.
You suggest that we have made SOURCE GENERATOR based on some database?

Oh, Eric, I think we better make DIRECT wrapper of
    Java around C++ kernel

Instead of 
    Java  around  ---  C framework around ---- C++ kernel

It will be quite not effective, in C framework catch C++ exceptions, convert
them into error codes, then on top level again convert them to exception...

This kill the whole idea of C++ exceptions!
This bring back again if() to check errors.
No Eric, I do not like this way.

Again, I agree with you that there is BIG SENSE provide C SDK framework,
To follow Apple standard way.


>> And I hope that will come times when will be developed binary standard for
>> C++ and all compilers: CW, GCC, Visual, Borland will produce compatible C++
>> binary code.. 
> 
> You can dream, but even for the same compiler it changes: GCC 2.98, 3.1 and
> 3.3!

But this changes happens EXACTLY BECAUSE they move to that BINARY STANDARD,
All, GCC, CW, Intel compiler.

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list