BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Languages for developing for .NET
Goto page 1, 2, 3, 4  Next
 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Non-Technical)
View previous topic :: View next topic  
Author Message
Vladimir Stefanovic
Guest





PostPosted: Mon Dec 20, 2004 5:03 pm    Post subject: Languages for developing for .NET Reply with quote



Hi,

What is the real benefit of using C++ or Pascal and
not C# for programming for .NET? AFAIK, C# is
specially designed for .NET.

I think that switching from C++ to C# is 'painless'
in comparison to switching from Win32 to .NET
concept.

Also, I think (please correct me if I'm wrong) that
even if you decide to use C++ for .NET you have to
follow the .NET concept, which means no header files
any more, modules referencing with namespace(s) not
include(s), and similar. Such code does not look any
more on the C++ code that I use now.




Best regards,
Vladimir Stefanovic



Back to top
Russell Hind
Guest





PostPosted: Mon Dec 20, 2004 5:19 pm    Post subject: Re: Languages for developing for .NET Reply with quote



Vladimir Stefanovic wrote:
Quote:
Hi,

What is the real benefit of using C++ or Pascal and
not C# for programming for .NET? AFAIK, C# is
specially designed for .NET.


For us, I ported an application to managed C++. Advantage was 95% of
the code was common between BCB and VS.Net. The 5% that was different
was a small set of standard C++ wrappers around both VCL controls and
..Net controls.

That would be a big advantage for us.

Cheers

Russell

Back to top
Alisdair Meredith [TeamB]
Guest





PostPosted: Mon Dec 20, 2004 5:21 pm    Post subject: Re: Languages for developing for .NET Reply with quote



Vladimir Stefanovic wrote:

Quote:
What is the real benefit of using C++ or Pascal and
not C# for programming for .NET? AFAIK, C# is
specially designed for .NET.

For me, 'deterministic destruction, the RAII concept. This is coming
in the next version of Visual Studio with the C++/CLI binding, but
still unique to C++ amd not available for C# <g>

Quote:
I think that switching from C++ to C# is 'painless'
in comparison to switching from Win32 to .NET
concept.

Not really, because suddenly user code is forced to manage all the
library resources (as with Delphi/Java and all those finally blocks)

We are still waiting to see how well .NET generics line up against C++
templates. There are some strong overlaps in the type-safety area, but
very different functionality elsewhere.

Quote:
Also, I think (please correct me if I'm wrong) that
even if you decide to use C++ for .NET you have to
follow the .NET concept, which means no header files
any more, modules referencing with namespace(s) not
include(s), and similar. Such code does not look any
more on the C++ code that I use now.

Not really, although that is probably how you will work with non-C++
libraries.

In other words, you can still work with headers, lib files, and all the
familiar C++ files so long as you are working with C++ (eg. STL, Boost,
your existing code) When you want to deal with the .NET API, or
classes implemented in other .NET languages, then you will probably be
using some other inclusion mechanism.

AlisdairM(TeamB)

Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Mon Dec 20, 2004 7:16 pm    Post subject: Re: Languages for developing for .NET Reply with quote


"Vladimir Stefanovic" <spam (AT) not (DOT) needed> wrote


Quote:
What is the real benefit of using C++ or Pascal and
not C# for programming for .NET? AFAIK, C# is
specially designed for .NET.

From what was shown at BorCon regarding the new C++/CLI architecture, things
like pointers and direct memory accessing are going to be preserved. C++
will be the only .NET language that supports that. I've heard it said that
C++ is being primed to become the language of choice on .NET because of its
strong features over C# and other .NET languages.


Gambit



Back to top
mr_organic
Guest





PostPosted: Mon Dec 20, 2004 7:38 pm    Post subject: Re: Languages for developing for .NET Reply with quote

"Remy Lebeau (TeamB)" <no.spam (AT) no (DOT) spam.com> wrote in
news:41c724cc$1 (AT) newsgroups (DOT) borland.com:

Quote:

From what was shown at BorCon regarding the new C++/CLI architecture,
things like pointers and direct memory accessing are going to be
preserved. C++ will be the only .NET language that supports that.
I've heard it said that C++ is being primed to become the language of
choice on .NET because of its strong features over C# and other .NET
languages.


Gambit


Eh - I doubt it. C# is (and has always been) the "standard" .NET
language, and I don't expect that to change. The only advantage that C++
brings to the table (now that C# supports generics) is its ability to
directly manipulate memory via pointers -- something that .NET explicitly
tries to keep you from doing. If you program for pure performance and/or
have to integrate a lot of legacy C++ code with new .NET stuff, then
C++/CLI makes sense. But for a lot of new projects, C++ makes no real
sense -- the learning curve is so shallow that it makes more sense to
just use C# at the get-go.

As an application developer, I like C# a lot more than C++ for almost
everything. The language is cleaner, the standard frameworks (ADO.NET
especially) give you most of the benefits of the VCL with little of the
pain, and execution speed is pretty good. I'm finding it more and more
difficult to find excuses to use C++ at all, but like I said, this is
from an application-developer standpoint. I'm not writing games or math-
intensive stuff or device drivers.

*Shrug* Whatever gets you down the road, I guess.

Regards,

mr_organic

Back to top
Jeff Overcash (TeamB)
Guest





PostPosted: Mon Dec 20, 2004 9:47 pm    Post subject: Re: Languages for developing for .NET Reply with quote


"Alisdair Meredith [TeamB]" <alisdair.NO.SPAM.PLEASE.meredith (AT) uk (DOT) renaultf1.com> wrote:
Quote:
Vladimir Stefanovic wrote:

What is the real benefit of using C++ or Pascal and
not C# for programming for .NET? AFAIK, C# is
specially designed for .NET.

For me, 'deterministic destruction, the RAII concept. This is coming
in the next version of Visual Studio with the C++/CLI binding, but
still unique to C++ amd not available for C#

But is available today in Delphi for .NET.


Back to top
Andre Kaufmann
Guest





PostPosted: Mon Dec 20, 2004 10:01 pm    Post subject: Re: Languages for developing for .NET Reply with quote

Quote:
[...]
Eh - I doubt it. C# is (and has always been) the "standard" .NET
language, and I don't expect that to change. The only advantage that C++
brings to the table (now that C# supports generics) is its ability to
directly manipulate memory via pointers -- something that .NET explicitly

I wonder why nobody mentions unsafe code blocks, which enables C# to use
pointers and direct memory access, too ?
I´m not that familiar with unsafe code blocks in C#, since i prefered to use
C++
if i had to do direct memory access, so i can´t comment on any restrictions.

At least i wouldn´t call C++ to be the only language using pointers and
direct memory access - or am i wrong ?
And i wonder if Delphi allows unsafe code blocks too ?

Quote:
tries to keep you from doing. If you program for pure performance and/or
have to integrate a lot of legacy C++ code with new .NET stuff, then
C++/CLI makes sense. But for a lot of new projects, C++ makes no real
sense -- the learning curve is so shallow that it makes more sense to
just use C# at the get-go.

[...]

I agree. C++ will optimize better than C#, but most times i still would
prefer
C# or Delphi, at least for applications, since code in these languages
compiles
much faster than C++ code.
What i miss(ed) somewhat in C# is the templates, STL and deterministic
destruction / disposing.
Ok, i have the using keyword in C#, but it would be a little bit more
convenient
for a C++ programmer, if objects in C# could be allocated like stack objects
in
C++.

E.g.:

using Object o1();
using Object o2();
.....

instead of: using (Object o1 = new Object()) { using (Object o2 = new
Object()) { ... } }

But since .NET allows me to mix different languages very easily, i´m free to
choose the languages that will fit best for a certain part of my
application.

Andre



Back to top
mr_organic
Guest





PostPosted: Mon Dec 20, 2004 10:09 pm    Post subject: Re: Languages for developing for .NET Reply with quote

"Andre Kaufmann" <_spamx_andre.kaufmann (AT) no-spam_t-online (DOT) de> wrote in
news:41c74bec$1 (AT) newsgroups (DOT) borland.com:

Quote:
I agree. C++ will optimize better than C#,

I hate to cherry-pick quotes , but I was struck by this statement.

I disagree that C++/CLI "will optimize better" simply because it will
compile to just about the same CIL as C# will. If the code is to run on the
CLR, then there's no difference in "optimization" between C#, C++/CLI, or
even Visual Basic(!!). As far as the .NET CLR is concerned, you should
probably just use the language that supports the idiom you like best. If
you're expecting some massive speed boost by using C++ instead of C#,
you're going to be badly disappointed.

mr_organic

Back to top
Andre Kaufmann
Guest





PostPosted: Mon Dec 20, 2004 10:16 pm    Post subject: Re: Languages for developing for .NET Reply with quote

"Jeff Overcash (TeamB)" <jeffovercash (AT) mindspring (DOT) com> schrieb im Newsbeitrag
news:41c7486b$1 (AT) newsgroups (DOT) borland.com...
Quote:

"Alisdair Meredith [TeamB]"
[email]alisdair.NO.SPAM.PLEASE.meredith (AT) uk (DOT) renaultf1.com[/email]> wrote:
Vladimir Stefanovic wrote:

[...]
For me, 'deterministic destruction, the RAII concept. This is coming
in the next version of Visual Studio with the C++/CLI binding, but
still unique to C++ amd not available for C#
But is available today in Delphi for .NET.


RAII ? You still have to call free in Delphi, or did i miss something ?
Though i like the way Borland has done the smooth transition from
Win32 to .NET. You can go on and code as you´ve been used to,
something that will be comparable possible for C++ code
only with C++/CLI, but not with manged C++ - i think that´s what
you´ve meant ?

Andre



Back to top
Chris Uzdavinis (TeamB)
Guest





PostPosted: Mon Dec 20, 2004 10:33 pm    Post subject: Re: Languages for developing for .NET Reply with quote

"mr_organic" <mr_organic (AT) yourmamashouse (DOT) com> writes:

Quote:
"Andre Kaufmann" <_spamx_andre.kaufmann (AT) no-spam_t-online (DOT) de> wrote in
news:41c74bec$1 (AT) newsgroups (DOT) borland.com:

I agree. C++ will optimize better than C#,

I hate to cherry-pick quotes , but I was struck by this statement.

I disagree that C++/CLI "will optimize better" simply because it will
compile to just about the same CIL as C# will. If the code is to run on the
CLR, then there's no difference in "optimization" between C#, C++/CLI, or
even Visual Basic(!!). As far as the .NET CLR is concerned, you should
probably just use the language that supports the idiom you like best. If
you're expecting some massive speed boost by using C++ instead of C#,
you're going to be badly disappointed.

One of the points that Herb Sutter made at BorCon was basically that,
the way C++ is designed, it works great with garbage collectors
because compared to most languages, C++ produces less garbage.

He cited a study where code was written in C# that was way too slow,
and after profiling, they found that over 70% of the time was spent in
what appeared to be simple code, but the usage of the GC was
excessive. They found that they could explicitly release an object
inside a loop and the GC overhead dramatically dropped.

The exercize took a couple of hours until it was well tuned and
running fine in C#. The point he was making in C++ is that such
efforts would not have been necessary had the code been written in
C++. The way C++ is designed, the generated code would have already
done what they had to debug/optimize by hand.

Additionally, C++ (especially Microsoft's version of it) has a much
more mature optimizer. And optimized code even in the CLI runs
faster. The just-in-time optimizations and compilations are not a
substitute for an initially well-generated program.

--
Chris (TeamB);

Back to top
Giuliano
Guest





PostPosted: Mon Dec 20, 2004 11:13 pm    Post subject: Re: Languages for developing for .NET Reply with quote

On Mon, 20 Dec 2004 18:03:20 +0100, "Vladimir Stefanovic" <spam (AT) not (DOT) needed>
wrote:

Quote:
Hi,

What is the real benefit of using C++ or Pascal and
not C# for programming for .NET? AFAIK, C# is
specially designed for .NET.
[snip]


Hi,

have a look at:

http://tinyurl.com/6xsj3

Regards

Giuliano




Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Mon Dec 20, 2004 11:57 pm    Post subject: Re: Languages for developing for .NET Reply with quote


"Giuliano" <gcardinali (AT) remove (DOT) adhoc.net> wrote


Quote:
have a look at:

http://tinyurl.com/6xsj3

Very nice Smile Thanks.


Gambit



Back to top
Russell Hind
Guest





PostPosted: Tue Dec 21, 2004 8:36 am    Post subject: Re: Languages for developing for .NET Reply with quote

Chris Uzdavinis (TeamB) wrote:
Quote:

Additionally, C++ (especially Microsoft's version of it) has a much
more mature optimizer. And optimized code even in the CLI runs
faster. The just-in-time optimizations and compilations are not a
substitute for an initially well-generated program.


From what I've read, MS link-time code generation will be available for
IL code in VS.Net 2005 so the IL passed to the CLR will be optimised
much more than that generated by VB.Net or C# also.

I guess they could port this technology to those languages also, but
would they bother?

Cheers

Russell

Back to top
Kris Golko
Guest





PostPosted: Tue Dec 21, 2004 10:04 am    Post subject: Re: Languages for developing for .NET Reply with quote

Quote:

RAII ? You still have to call free in Delphi, or did i miss something ?

You do miss something, you don't have to call free in Delphi for .Net,
you can for backward compatibility.

Kris

Back to top
Vladimir Stefanovic
Guest





PostPosted: Tue Dec 21, 2004 10:28 am    Post subject: Re: Languages for developing for .NET Reply with quote

Also, C# does not support multiple inheritance which may
be the problem for many those who have much C++ code
to be ported.




Best regards,
Vladimir Stefanovic

Russell Hind <noone (AT) nowhere (DOT) com> wrote

Quote:
Vladimir Stefanovic wrote:
Hi,

What is the real benefit of using C++ or Pascal and
not C# for programming for .NET? AFAIK, C# is
specially designed for .NET.


For us, I ported an application to managed C++. Advantage was 95%
of
the code was common between BCB and VS.Net. The 5% that was
different
was a small set of standard C++ wrappers around both VCL controls
and
.Net controls.

That would be a big advantage for us.

Cheers

Russell



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Non-Technical) All times are GMT
Goto page 1, 2, 3, 4  Next
Page 1 of 4

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.