c# is a good way to learn c

?

=?iso-8859-1?Q?Lin=F8nut?=

tab poked his little head through the XP firewall and said:
In your dreams you one language twit.

Is that supposed to be a reasoned response?

Or did you wake up today with a wild hair?
 
G

Greg Cox

LOL.

Ok, so then that argument applies to each and every application that
might consider .NET

That might be true if Microsoft hadn't released a .NET version of Visual
C++. With that they can immediately reuse 95%+ of the existing code
base and integrate any desired .NET features for the next version.
 
G

Greg Cox

My guess is more security, and one code executable that runs on 64 bit, 32
bit, Itanium,....
Also .NET programs are far more modular in design and thus easier to change.

But it won't happen overnight.

So how far along this road would you get by just switching your project
from using Microsoft's Visual C++ 6.x to their Visual C++ .NET dev
environment (like Office would be doing)?
 
G

Greg Cox

Hi Greg_Cox, Re: CodeWright, You wrote: <<
I'm unfamiliar with a debugger by them so I can't comment. >>

You used MicroSoft's debugger then, I assume, MS_DevStudio... Right ?
( or Visual_Studio )

Correct, except when we had to debug Windows itself, then we used the
kernel debugger. While we were developing Exchange Server we were also
taking weekly drops of what would become Win2k Server from the Windows
dev team. I NEVER want to go through that again. What a nightmare...
Visual_Studio_Net_2003 allows On_The_Fly macros,
I hit F7 to start/stop recording and then F8 to play it.
The so_called quick_Macro can then be edited, if I want,
to create a VBA script ( to assign it to a key or toolbar icon ).

Holding down the Alt and the Shift keys and then moving the text cursor
( via the mouse or keys ) allows me to select a block of text,
...instead of sequential characters.

I'll have to remember both of those. Thanks.
 
O

Olaf Baeyens

My guess is more security, and one code executable that runs on 64 bit,
So how far along this road would you get by just switching your project
from using Microsoft's Visual C++ 6.x to their Visual C++ .NET dev
environment (like Office would be doing)?
I don't think they will rewrite from scratch.
They probably start creating the new stuff in C#/managed C++ as they build
while keeping their original code.
Probably the parts that are securety sensitive and Internet related word
could be rewritten or t leas ported to .NET way of doing.
And gradually when people get more and more experienced with the .NET way,
more code will be ported als older unmanaged C++ gets replaced by new
people.

In my opinion, it will take a few years before completing the stuff.
The new .NET version should have at lease the same functionality als the
previous one, so it is not something you write in a short time.
 
L

Lee Marvin

Olaf said:
In my opinion, it will take a few years before completing the stuff.
The new .NET version should have at lease the same functionality als the
previous one, so it is not something you write in a short time.

The real issue is that the new Web oriented technologies such as .NET
make the Office concept of monolithic desktop apps obsolete.

Notepad, Thunderbird and Firefox serve 99.9% of both the home and
business user.
 
G

Greg Cox

I don't think they will rewrite from scratch.
They probably start creating the new stuff in C#/managed C++ as they build
while keeping their original code.
Probably the parts that are securety sensitive and Internet related word
could be rewritten or t leas ported to .NET way of doing.
And gradually when people get more and more experienced with the .NET way,
more code will be ported als older unmanaged C++ gets replaced by new
people.

In my opinion, it will take a few years before completing the stuff.
The new .NET version should have at lease the same functionality als the
previous one, so it is not something you write in a short time.

Given my eighteen years at Microsoft as direct experience, what you
describe sounds very likely how they will move Office into the future.
 
?

=?iso-8859-1?Q?Lin=F8nut?=

Greg Cox poked his little head through the XP firewall and said:
That might be true if Microsoft hadn't released a .NET version of Visual
C++. With that they can immediately reuse 95%+ of the existing code
base and integrate any desired .NET features for the next version.

Yeah, the same you can can "integrate" C code into C++ projects.
 
G

Greg Cox

=?iso-8859-1?Q? said:
Greg Cox poked his little head through the XP firewall and said:


Yeah, the same you can can "integrate" C code into C++ projects.

Well, yea. What do you think C++ is? Or, in other words, do you think
that the formula handling code in Excel that is written in C++ has to be
completely rewritten to make Excel .NET compatable?
 
J

Jeff_Relf

Hi Olaf_Baeyens, You didn't say anything about my example of LoopTo(),
so I presume that you don't care about it,
but, at any rate, I recently fixed a bug in LoopTo().

It should be:
#define \
LoopTo( StopCond ) \
while ( Ch && ( Ch2 = ! ( Ch = ( uchar ) * ++ P ) \
? 0 : ( uchar ) P [ 1 ] \
, Ch ) \
&& ! ( StopCond ) )
Not:
#define \
LoopTo( StopCond ) \
while ( Ch && ( Ch = ( uchar ) * ++ P \
, Ch2 = ( uchar ) P [ 1 ] \
, Ch ) \
&& ! ( StopCond ) )

The problem with the old LoopTo() was that
it very Randomly_Rarely read a bad pointer when setting Ch2.

This usually happened only outside the debugger,
but, when it happened inside the debugger,
the debugger was insane, showing nothing but incorrect information.

I finally found the bug by using the /Z7 compiler switch
and turning on the JIT_Debugger.
 
J

Jeff_Relf

Hi Gerry, You asked: <<
Relf ? Is this a backhanded reference to a 60's guitarist ? >>

No, Jeff_Relf was the name given to me
when I was born in Seattle at the start of 1960.
The word Jeff_Relf is in all my Message_IDs... I never nymshift.

Relf a U_S_English_German name.

P.S. I get far too many replies,
so a heartfelt thank_you goes out to any and all who plonk me.

Take a look at the following analysis of Microsoft.Public.Dotnet.General,
my post on C# is the second Most_Oft_Replied_To.

Below are the 24 Most_Oft_Replied_To posts based on the leftmost number
telling how frequently the post is found in the 5 most recent Message-IDs
in the References header of each of the last 2,000 articles.

No deletions, retentions or filtering biased these results.

Generated using X.EXE ( X.TXT has the settings ):
http://www.Cotse.NET/users/jeffrelf/X.EXE
http://www.Cotse.NET/users/jeffrelf/X.TXT

57 Montrose ( 5, 10._9 P, _D8XRi0 E Speakeasy.NET, Mozilla ),
c# is a good way to learn c
46 Jeff_Relf ( 7, 1.26 A, D Readfreenews.NET, X ),
C#'s high level routines are compromises.
42 Jerome ( 5, 2._7 A, B Sdsu.EDU, Mozilla ),
Access or Visual Studio?
35 Olaf_Baeyens ( 6, 1.43 A, E Skynet.BE, Microsoft ),
Re: c# is a good way to learn c
33 Alex ( 28, 9.54 P, A Individual.NET, Microsoft ),
In need of .NET advocacy
32 Olaf_Baeyens ( 6, 5.11 A, D Skynet.BE, Microsoft ),
Re: c# is a good way to learn c
31 Bruce_Wood ( 7, 2._5 P, _DzpR1C C Googlegroups.COM, G2_0_2 ),
Re: C#'s high level routines are compromises.
30 Cowboy ( 5, 4.19 A, B Sgi.COM, Microsoft ),
Re: Access or Visual Studio?
30 Jeff_Relf ( 8, 2._5 A, C Readfreenews.NET, X ),
The STL and C# make people lazy.
27 Alex ( 30, 3._9 P, A Individual.NET, Microsoft ),
Re: In need of .NET advocacy
27 Tom_Shelton ( 6, 6.35 P, _bQH7V E Comcast.COM, slrn_0_9_8_1 ),
Re: c# is a good way to learn c
23 Sean_Hederman ( 6, 6.50 A, E Saix.NET, Microsoft ),
Re: c# is a good way to learn c
23 Jeff_Relf ( 7, 5.40 A, D Readfreenews.NET, X ),
Loop() is great shorthand.
22 Sean_Hederman ( 7, 4.15 A, E Saix.NET, Microsoft ),
Re: For greater readability, I put the simplest code in the true part.
22 Linonut ( 6, 4.40 A, _BPdF6I E Comcast.COM, slrn_0_9_8_1 ),
Re: c# is a good way to learn c
21 Linonut ( 6, 4.39 A, _BPdF6I E Comcast.COM, slrn_0_9_8_1 ),
Re: c# is a good way to learn c
21 Bob_Powell ( 6, 2.13 A, B Sdsu.EDU, Microsoft ),
Re: c# is a good way to learn c
21 Sean_Hederman ( 7, 4._6 A, D Saix.NET, Microsoft ),
Re: C#'s high level routines are compromises.
21 Theatre_Mgmt ( 27, _.54 P, D Nntpserver.COM, Mozilla ),
Sun admits: Java is crap
21 Tom_Shelton ( 7, 1.31 A, _bQH7V E Comcast.COM, slrn_0_9_8_1 ),
Re: c# is a good way to learn c
21 Linonut ( 6, 9._3 A, _BPdF6I E Comcast.COM, slrn_0_9_8_1 ),
Re: c# is a good way to learn c
21 Olaf_Baeyens ( 7, _.52 A, C Skynet.BE, Microsoft ),
Re: c# is a good way to learn c
20 Jeff_Relf ( 7, 2.22 A, D Readfreenews.NET, X ),
For greater readability, I put the simplest code in the true part.
19 Kevin_Spencer ( 5, 7.33 A, B Sdsu.EDU, Microsoft ),
Re: Access or Visual Studio?
news:#[email protected]
 
O

Olaf Baeyens

Hi Olaf_Baeyens, You didn't say anything about my example of LoopTo(),
so I presume that you don't care about it,
but, at any rate, I recently fixed a bug in LoopTo().
Actually no time to check it all.

When I program in unmanaged C++ as I have done the last few months, I get a
lot of spare time waiting for the compiler to compile, so I can read and
react. But now since I am back to .NET both unmanaged C++ and C# it compiles
so fast that I don't have time anymore to read it all.

It is amazing the difference of using brain power when I program in C++ or
C#.
Programming unmanaged C++ is like doing your examination, when I come home
then I am burned up. But now that I work with C#, not only I do I have a lot
of energy when I get home, I also can do more thinking about the program I
am busy with. I have a much broader view of what the program will do and
what direction I am going to take. Thus becoming far more productive.

You could say that C++ is hurting my eyes because I have to focus on the
very complicated keyword stuff and macros's to make my program work. While
in C# the syntax is so easily readable that I can sit back and look at the
whole picture in a very relaxed state. Which is very odd since I have years
of C++ experience and very lmited C# experience.

Programming C++ is like driving through a fog, your get tired very fast.

An example (I don't have time to make it the same example, just a quick
example)

This is the C# way:

override public System.String Text {
set {
Title.Text=value;
Title.Invalidate(true);
}
get {return Title.Text;}
}

------------------
This is the managed C++ way.

public: __property virtual System::String __gc * get_Extension() {
return m_pDataset->Extension.c_str();
}
public: __property virtual void set_Extension(System::String __gc
*asDataSetExt) {
m_pDataset->Extension=LPCTSTR((char*)(void*)...
}

------------------
And this is the unmanaged C++ way;

public: __declspec(property(get=get_Prefix, put=set_Prefix)) string Prefix;
public: virtual string get_Prefix() {
return m_sScanFilePrefix;
};
public: virtual set_Prefix(string aValue) {
m_sScanFilePrefix=aValue;
}

-----------------
 
J

Jeff_Relf

Hi Olaf_Baeyens ( and Greg_Cox ),

It remains to be seen whether Visual_Studio itself, for example,
would ever run under the Dot_Net_Program.

Further, even if that happened,
it remains to be seen if it would become a success or not.
Coders could always use a debugger written in C instead.

Imagine a debugger running under the Dot_Net_Program ! ?

Remember, Dot_Net is an untested pig which forbids #define.
C goes back to 1970... Firefox is written in C++, Linux in C.
 
J

Jeff_Relf

Hi Olaf, Re: The code you showed me,

I didn't understand it.
I've found that it helps if you include a main() to test your examples.

Further, although I have Visual_Studio_2003,
and therefore I can compile and run managed code,
I'm not inclined to do so.

You told me: << It is amazing
the difference of using brain power when I program in C++ or C#.
Programming unmanaged C++ is like doing your examination,
when I come home then I am burned up.
But now that I work with C#,
not only I do I have a lot of energy when I get home,
I also can do more thinking about the program I am busy with.
I have a much broader view of
what the program will do and what direction I am going to take.
Thus becoming far more productive.

You could say that C++ is hurting my eyes because I have to focus on
the very complicated keyword stuff and macros's to make my program work.
While in C# the syntax is so easily readable that
I can sit back and look at the whole picture in a very relaxed state.
Which is very odd since
I have years of C++ experience and very lmited C# experience.

Programming C++ is like driving through a fog,
your get tired very fast. >>

I'm glad you're enjoying the Dot_Net_Program,
but I won't use it because it doesn't allow #define.
Further, I've never seen anything in Dot_Net that interested me.
 
J

Jeff_Relf

Hi Greg_Cox, Re: VS's block_select and quick_macros, You told me: <<
I'll have to remember both of those. Thanks. >>

You're welcome, of course.
I had been wondering for a long time what debugger MicroSoft-proper used.
I'm very glad to hear it was Visual_Studio.
 
O

Olaf Baeyens

I didn't understand it.
I've found that it helps if you include a main() to test your examples.
I tried to show the readability between the different languages and
operation modes.
The C# syntax language doesn't make me go blind. ;-) Much easier to read,
and thus understand.
I'm glad you're enjoying the Dot_Net_Program,
but I won't use it because it doesn't allow #define.
Further, I've never seen anything in Dot_Net that interested me.
It is your choice.
It has a lot of very interesting stuff. So many things, so little time.
 
J

Jeff_Relf

Hi Greg_Cox ( and Olaf_Baeyens ),

I used MS_C_6 for years, I'm using only MS_CPP_7_1 right now,
Visual_Studio_Net_2003... but I have no plans to use managed code.

I switched to C++ from C so that I could declare variables
without braces, {}, and do & referencing, instead of pointers.
For example: { func(); int Y, & X = Y ; func(); }

I just like the way it looked and porting my code was no big deal.

The C99 specs allows that stuff, but MicroSoft's C doesn't.

Nevertheless, C++'s String, cout and the STL have never appealed to me.
I like to keep a closer eye on allocations/deallocations,
and I have my own way of handling dynamic arrays.
 
?

=?iso-8859-1?Q?Lin=F8nut?=

Olaf Baeyens poked his little head through the XP firewall and said:
And this is the unmanaged C++ way;

public: __declspec(property(get=get_Prefix, put=set_Prefix)) string Prefix;
public: virtual string get_Prefix() {
return m_sScanFilePrefix;
};
public: virtual set_Prefix(string aValue) {
m_sScanFilePrefix=aValue;
}

That isn't C++, either.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top