Re: [Plib-devel] PLIB developers needed.
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2000-08-11 04:56:11
|
> Dave McClurg wrote: > > Steve wrote: > > I tried to compile PLIB on an SGI machine at work - and your > > 'const-ification' of the clock > > routine stopped it from compiling on the IRIX compiler. > #1 means you can't change what foo points to. You already use this heavily in SG. Sure - that makes sense. > #2 means that the class method getSomething cannot change its instance. Ah! I see. > I really thought 'Type getSomething () const' was a very portable and standard > idiom. Could you check the SGI documentation on that? I don't have documentation that's *that* detailed. But the code flat-out won't compile. Hard errors - not just warnings. Simply deleting the 'const' was enough to make it compile. > If needed, I will remove the 'const' methods as you advise. 'fraid so. I use PLIB on SGI's quite a bit these days - and it's rather embarassing when my very own *portable* library won't compile on the computer on my desk! You may have wondered why I don't use 'const' a whole lot - maybe you realise why! I loath and detest "creeping const" - where const's have to be put in and taken out continually to get the program to compile. AAARRRGGGHHHH! The few (very few) bugs they save you from are certainly not worth the hassle. C (and hence C++) is a great language because it DOESN'T treat the programmer like a small child. You are allowed to make mistakes - and in exchange get to be all-powerful. Like I said in my last post - C++ was a *great* language in the very first release - everything added to it since then has been a downhill slide. C + classes + overloaded functions + virtual functions ... was all I ever wanted! The only addition that I'd make to the original C++ language would be: type *x ; .... delete x ; ...should do an implicit "x=NULL;" But I can live without it! -- Steve Baker HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://web2.airmail.net/sjbaker1 Projects : http://plib.sourceforge.net http://tuxaqfh.sourceforge.net http://tuxkart.sourceforge.net http://prettypoly.sourceforge.net |