Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > BCL for native C++ - possible?

Reply
Thread Tools

BCL for native C++ - possible?

 
 
Andreas Schmitt
Guest
Posts: n/a
 
      05-17-2007
Crazy idea but...

I think everyone could agree with the statement that the CLI standard
Base Class Library is incredibly useful, not to mention the extentions
by microsoft and managed directX and several other stuff that builds on
top of the BCL.

Now.. do you think it would be possible to port the BCL to C++?

Meaning starting with an object class all other classes have to inherit
from, building structs (value classes) around the native types, giving
them the same nice methods as in .net.
Disallowing ref types to be created on the stack (one might think of
declaring the destructor protected and make every smart pointer a
friend, handling smart pointers like the handles in C++/CLI)

Of course some stuff should be conventions then, like always inherit
from Object, and always use smart pointers / handles to instantiate ref
types and so on...

Then on that basis implement the entire BCL for C++ as a class library.

It is very much bigger than the STL but the STL is perfect as a basis
for the implementation... and the Class library could be a basis to
build on top of.
I think much of the productivity of .NET is caused by the enormeous help
the BCL is offering and secondly by the garbage collector.

I think one could reach a similar level on native C++ if having the same
classes available together with the upcoming GC for C++0x.
Memory leaks should not pose a problem anymore if all classes force you
to not instatiate them with a simple pointer but always either using a
smart pointer or with C++0x the native garbage collector.


As I said, crazy idea, especially considering how huge the BCL is, even
without all the useful extentions for it around...

but just as a question.. would this make sense, do you think this would
be something native C++ programmers could benefit from?
Do you think it is possible to implement something like the BCL in
native C++ and kinda "emulate" the .NET BCL behavior close enough?

Looking forward to hearing a few opinions.
 
Reply With Quote
 
 
 
 
Ole Nielsby
Guest
Posts: n/a
 
      05-18-2007
Andreas Schmitt <> wrote:

> Crazy idea but...
>
> I think everyone could agree with the statement that the CLI standard Base
> Class Library is incredibly useful, not to mention the extentions by
> microsoft and managed directX and several other stuff that builds on top
> of the BCL.
>
> [...]
> Looking forward to hearing a few opinions.


If that's the style you want, why not just use C#?

IMO a merge of concepts from wxWidgets, VCL and the boost
libraries would serve us better.

As for things to come, I'm sad to learn that reflection won't make
it into the next C++ standard - it's the CLI thing I really miss in C++.
(VCL makes a nice attempt of grafting reflection on top of C++ but
it would be much nicer if the language had support for it.)


 
Reply With Quote
 
 
 
 
rep_movsd
Guest
Posts: n/a
 
      05-19-2007
IMHO,

Having used wxWidgets, QT, and VCL, I believe QT stands above all in
terms of functionality and elegance. The fact that its crossplatform
and has a GPL version is a big boost ( pun intended ).

QT gives you everything you ever needed in a C++ framework.
IO / Threads / GUI / Networking / Graphics manipulation / regular
expressions and so on.

The signal/slot arch is also a very convenient programming model.

Im not familiar with the .NET side of things, but whenever I felt the
need for soome functionality , I always almost found it already
present in QT. After wrestling with wxWidgets for a long time QT came
a very cool breath of fresh air.

Vivek

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
BCL Extend wireless network Russell NZ Computing 0 05-20-2006 12:04 PM
Runnig at Native speed...Dream or reality ? main\(\){}; ASP .Net 3 12-14-2004 06:24 PM
Forcing native 802.1x supplicant to re-auth??! Tony Wireless Networking 3 07-07-2004 11:35 PM
Difference between BCL and FCL? R K MCSD 2 06-09-2004 06:35 PM
Is there a .NET or C# to native x86 compiler? Andy Chau ASP .Net 11 01-02-2004 06:45 PM



Advertisments