943,640 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Unsolved
  • Views: 2517
  • C# RSS
You are currently viewing page 1 of this multi-page discussion thread
Sep 24th, 2009
1

why doesnt c# require header files?

Expand Post »
i wonder it, because i hate c++ header files. if c# compiler has a way of getting rid of them, why cant c++ do?
here some similar info but i am not satisfied.
http://stackoverflow.com/questions/1...te-header-file
Similar Threads
Featured Poster
Reputation Points: 854
Solved Threads: 127
Banned
serkan sendur is offline Offline
2,057 posts
since Jan 2008
Sep 24th, 2009
0

Re: why doesnt c# require header files?

i wonder it, because i hate c++ header files. if c# compiler has a way of getting rid of them, why cant c++ do?
here some similar info but i am not satisfied.
http://stackoverflow.com/questions/1...te-header-file
This is a C/CPP forum question disguised as a C# question--flag as bad post!
Reputation Points: 341
Solved Threads: 233
Posting Shark
DdoubleD is offline Offline
984 posts
since Jul 2009
Sep 24th, 2009
1

Re: why doesnt c# require header files?

No i posted it to here to have Scott involved in the conversation.
Today he is in good mood. And also i really wonder how c# deals without having header files, if that can be done, why c++ has them, of course it cant be for bothering the programmer.
Featured Poster
Reputation Points: 854
Solved Threads: 127
Banned
serkan sendur is offline Offline
2,057 posts
since Jan 2008
Sep 24th, 2009
1

Re: why doesnt c# require header files?

Some 20 years ago I programmed in this language
It had the concept of a DEFINITION MODULE(= +-header file) and IMPLEMENTATION MODULE. You could design all your definitions and then let a team of programmers fill in the implementations. It would complile even if not all implementations were filled in.
So you could say FROM Circle IMPORT Draw; to use the Draw procedure, while other procedures like CalculateArea are perhaps not yet implemented!
In C (I believe also in C++) when you include a header file, all of the implementation would be loaded in your program, even if you don't need it. Possible that a smart C or C++ compiler will prune out the code that is not needed afterwards, I dont know.
C# is a modern language and VS is a nice environment to develop in, so who needs headers in the 21th century?
Reputation Points: 2023
Solved Threads: 644
Senior Poster
ddanbe is online now Online
3,736 posts
since Oct 2008
Sep 24th, 2009
0

Re: why doesnt c# require header files?

So you think c# is better than c++? if Narue were alive, she would prove you wrong as a well known c++ geek
Featured Poster
Reputation Points: 854
Solved Threads: 127
Banned
serkan sendur is offline Offline
2,057 posts
since Jan 2008
Sep 24th, 2009
0

Re: why doesnt c# require header files?

Did I say anywhere C# was better?
Better in computer languages does not exist, for instance I find this language not bad
Last edited by ddanbe; Sep 24th, 2009 at 5:52 pm.
Reputation Points: 2023
Solved Threads: 644
Senior Poster
ddanbe is online now Online
3,736 posts
since Oct 2008
Sep 24th, 2009
1

Re: why doesnt c# require header files?

No i posted it to here to have Scott involved in the conversation.
Today he is in good mood. And also i really wonder how c# deals without having header files, if that can be done, why c++ has them, of course it cant be for bothering the programmer.
When am I not in a good mood!?

Danny -- To the point you made that is also available in C# it is just done a little differently. You can create an assembly full of interfaces (unimplemented methods, just like the header file) and give the assembly to your developers. They can each start implementing their respective methods. I couldn't image developing something like this to be honest. You'll usually miss something along the way. It seems so much easier to just shoot a few emails back and forth and establish the "middle ground" where your code meets up and goes from there. If you forget an interface then you have to go back in and add it, rebuild your assembly, distribute it to the team, hope everyone upgrades and you don't have two different versions of the interface floating around with different signatures, etc. How did this work for you?

Serkan -- I don't know that much about c/cpp to be honest. I 'grew up' on pascal and switched over to pascal with some other archaic languages along the way. I think the thread you posted gives some very good examples:
Quote ...
1.To improve build times.
2.To link against code without having the source for the definitions.
3.To avoid marking everything "inline".
Beyond that .. I don't know
Featured Poster
Reputation Points: 1749
Solved Threads: 735
Senior Poster
sknake is offline Offline
3,948 posts
since Feb 2009
Sep 24th, 2009
0

Re: why doesnt c# require header files?

Click to Expand / Collapse  Quote originally posted by ddanbe ...
Did I say anywhere C# was better?
Better in computer languages does not exist, for instance I find this language not bad
I was about to say something practical, then I read your link and lost it--
Reputation Points: 341
Solved Threads: 233
Posting Shark
DdoubleD is offline Offline
984 posts
since Jul 2009
Sep 24th, 2009
0

Re: why doesnt c# require header files?

Click to Expand / Collapse  Quote originally posted by ddanbe ...
Did I say anywhere C# was better?
Better in computer languages does not exist, for instance I find this language not bad
I still write programs on my TI-85 during class sometimes

[edit]
"" what DdoubleD said. I read the link after I posted
[/edit]
Last edited by sknake; Sep 24th, 2009 at 5:56 pm.
Featured Poster
Reputation Points: 1749
Solved Threads: 735
Senior Poster
sknake is offline Offline
3,948 posts
since Feb 2009
Sep 24th, 2009
0

Re: why doesnt c# require header files?

@Scott No problem whatsoever. We where three guys sitting in a room with 3 computers. We talked to each other. I believe e-mail as we know it now had to be invented...
Reputation Points: 2023
Solved Threads: 644
Senior Poster
ddanbe is online now Online
3,736 posts
since Oct 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C# Forum Timeline: Get dataGridView cell style back!!
Next Thread in C# Forum Timeline: Why doesnt c# require make files?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC