why doesnt c# require header files?

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Jan 2008
Posts: 2,052
Reputation: serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light 
Solved Threads: 118
Featured Poster
serkan sendur serkan sendur is offline Offline
Postaholic

why doesnt c# require header files?

 
1
  #1
Sep 24th, 2009
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
Due to lack of freedom of speech, i no longer post on this website.
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 938
Reputation: DdoubleD is a jewel in the rough DdoubleD is a jewel in the rough DdoubleD is a jewel in the rough DdoubleD is a jewel in the rough 
Solved Threads: 152
DdoubleD DdoubleD is offline Offline
Posting Shark

Re: why doesnt c# require header files?

 
0
  #2
Sep 24th, 2009
Originally Posted by serkan sendur View 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
This is a C/CPP forum question disguised as a C# question--flag as bad post!
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 2,052
Reputation: serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light 
Solved Threads: 118
Featured Poster
serkan sendur serkan sendur is offline Offline
Postaholic

Re: why doesnt c# require header files?

 
1
  #3
Sep 24th, 2009
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.
Due to lack of freedom of speech, i no longer post on this website.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 1,984
Reputation: ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of 
Solved Threads: 289
ddanbe's Avatar
ddanbe ddanbe is offline Offline
Posting Virtuoso

Re: why doesnt c# require header files?

 
1
  #4
Sep 24th, 2009
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?
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 2,052
Reputation: serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light 
Solved Threads: 118
Featured Poster
serkan sendur serkan sendur is offline Offline
Postaholic

Re: why doesnt c# require header files?

 
0
  #5
Sep 24th, 2009
So you think c# is better than c++? if Narue were alive, she would prove you wrong as a well known c++ geek
Due to lack of freedom of speech, i no longer post on this website.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 1,984
Reputation: ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of 
Solved Threads: 289
ddanbe's Avatar
ddanbe ddanbe is offline Offline
Posting Virtuoso

Re: why doesnt c# require header files?

 
0
  #6
Sep 24th, 2009
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.
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,285
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 586
Sponsor
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast

Re: why doesnt c# require header files?

 
1
  #7
Sep 24th, 2009
Originally Posted by serkan sendur View Post
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:
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
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 938
Reputation: DdoubleD is a jewel in the rough DdoubleD is a jewel in the rough DdoubleD is a jewel in the rough DdoubleD is a jewel in the rough 
Solved Threads: 152
DdoubleD DdoubleD is offline Offline
Posting Shark

Re: why doesnt c# require header files?

 
0
  #8
Sep 24th, 2009
Originally Posted by ddanbe View Post
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--
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,285
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 586
Sponsor
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast

Re: why doesnt c# require header files?

 
0
  #9
Sep 24th, 2009
Originally Posted by ddanbe View Post
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.
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 1,984
Reputation: ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of 
Solved Threads: 289
ddanbe's Avatar
ddanbe ddanbe is offline Offline
Posting Virtuoso

Re: why doesnt c# require header files?

 
0
  #10
Sep 24th, 2009
@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...
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC