Christopher R. Hertel crh at NTS.Umn.EDU
Fri Jul 31 03:41:01 GMT 1998

> I think one of the reasons I really hate typing the file name in a
> source code file is that I once used (and taught actually) modula2. In
> modula2 you have to name your module the same as the file name. The
> name generally appears in 3 places in the file.

Yes, that was a pain.  I wrote a compiler in Modula2 once.  (Okay, it
compiled a pseudo language down to a pseudo code, but it was a dang nifty

On the plus side, there as a whole lot of good in Modula2 and Borland did
a very, very good job of distilling out the good stuff in their Turbo
Pascal.  I liked the good points of both.

> This was an enormous pain and extremely aggravating. You couldn't just
> copy a testcode.mod to testcode2.mod and compile it, you had to do a
> search/replace for the damn file name. I _hated_ that. Having to do it
> for function names as well would be pretty close to my idea of hell.

As I said, we do this anyway.  We have function names in DEBUG() calls as
it is.

> I refuse to have anything even remotely like this in Samba :-)

Hmmm...  How many places in Samba do we have two functions which are 
similar but not quite the same?  How many times has a function been copied 
and renamed?

While I agree that we don't want to create extra (and annoying) work, I 
think that some of this name changing stuff is normal.  (Of course, I 
believe that we could reduce this kind of thing by moving toward a more 
modular, object-oriented style of programming... but you *knew* I was 
going to say that...  ;)

Chris -)-----

Christopher R. Hertel -)-----                   University of Minnesota
crh at              Networking and Telecommunications Services

More information about the samba-technical mailing list