Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 May 1999 07:54:01 -0400 (EDT)
From:      Thomas David Rivers <rivers@dignus.com>
To:        adam@whizkidtech.net, dima@tejblum.dnttm.rssi.ru
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: wc* routines
Message-ID:  <199905061154.HAA73794@lakes.dignus.com>
In-Reply-To: <19990505214934.B217@whizkidtech.net>

next in thread | previous in thread | raw e-mail | index | archive | help
> I will also need to get some input on some "philosophical" questions. Namely,
> I will need to build several tables for the wctype.h functionality. The thing
> is that the standard is open: New codes can and will be added to it. I need
> to decide whether to hardcode the tables or place them into files. At this
> point, I am leaning toward the hardcoded solution for several reasons: A file
> can be misplaced or lost, or even corrupted; the changes do not happen too
> often; the changes do not affect major languages and are of little consequence
> to most computer users (so if Egyptian hieroglyphics are added to plane 1 as
> planned, Egyptologists will need to update their C libraries, while us mortals
> may pretty much ignore it); it is just as easy to download an update of the
> C library as an update of several files. For what it's worth, I will need to
> write some utilities for my own use, utilities to create the code for tables.
> So any time they add some new code of interest to only a small group of people,
> the group can use the utilities on their own computers, and simply recompile
> the library even if I am on vacation, or whatever.

 I mention this, somewhat facetiously... but one of the fundamental
 discoveries in computer science was the idea of separation between
 code and data.   Although you bring up good points; realize that
 you are violating that tenet... and as such, are inviting potential
 trouble.

 I'm not saying that it is to be taken to the extreme... and there
 certainly are situations that call for placing data in the "code"
 as it were... If you want to do such a thing, I would suggest that
 the reasons _for_ it be *very* strong, and there be none against
 it... I don't get the impression, from your description above,
 that is the case.

 Perhaps a half-way point is needed, much as the locale library
 is implemented.  Provide, in the library, some default table
 that is a "reasonable subset of everything" so programs don't 
 just blow up if they can't find the file... then, provide the
 mechanism for reading the file if they can find it.

 And, you shouldn't assume those Egyptologists can actually
 recompile & relink their code.  For example, if a word-processing
 company has sold them a program - it's likely to be quite some
 time before the next release which is recompiled/relinked with
 newer FreeBSD libraries is available...  But, if the data was
 separate from the code - the Egyptologists would simply need to
 get the new file & not require a new release from their vendor
 (see - powerful, ain't it.)

 Since you mentioned "philisophical" :-) .


	- Dave Rivers -


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199905061154.HAA73794>