POV-Ray : Newsgroups : povray.off-topic : Unix shell : Re: Unix shell Server Time
3 Sep 2024 23:23:14 EDT (-0400)
  Re: Unix shell  
From: Darren New
Date: 31 Jan 2011 18:38:29
Message: <4d4747f5$1@news.povray.org>
Warp wrote:
>   Exactly how is this situation different from your example?

Or, to phrase it a different way, compiling *your* C code can wind up 
depending on the quality of the source code provided by every "pre-compiled" 
library author whose code you're using. Not only does their library object 
code have to work as advertised, but you have to recompile vital pieces of 
it every time you compile your code.

I find this to be a disturbingly problematic lack of modularity in large 
projects taking advantage of lots of pre-built code. And most other 
languages don't really make you care what some third party's coding standard 
is, as long as the library runs, because you don't get their source code.

Does that clarify the fundamental problem?




Or, look at it a different way, if you're *really* interested in pursuing 
understanding what I'm saying:  Why do you #include stdio in your program?
As you said, it's part of the standard. You can't change it without breaking 
lots of programs. Also, you can't pick a different function to be called 
"printf" without breaking any library that expects "printf" to mean the one 
from stdio. (I.e., C's linker has a flat namespace, so if *anyone* includes 
stdio, then the symbols from stdio will preclude using that name anywhere 
else to mean something different.)  So why does one have to recompile 
stdio.h every time you compile a program?

I know the *technical* reason, as in "because that's how C works." I'm 
asking you to try to understand why working that way is not as good as 
simply telling the compiler you're using the standard library and symbols 
come from there. You see the fact that you're recompiling bits and pieces of 
the standard-mandated standard libraries (that you correctly acknowledge 
can't be changed anyway) every single time you compile your program, yes? 
And that doesn't sound like a strange idea?

-- 
Darren New, San Diego CA, USA (PST)
  "How did he die?"   "He got shot in the hand."
     "That was fatal?"
          "He was holding a live grenade at the time."


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.