TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: KEVIN CAMPBELL
from: DARIN MCBRIDE
date: 1997-07-10 20:08:00
subject: template hell?

 -=> Quoting Kevin Campbell to Cameron Clark
 >     I've been very unsucceful in turning a library into a template
 > class.
 KC> Linked-lists always seem unwilling to template very well. My only
 KC> advice is Don't. It gets easier in the long run if you don't.
I would disagree strongly.  Linked lists not only template quite well, but 
re
definately worth the effort in the long run.  All you have to do is want to
use linked lists more than twice, and the effort is generally paid off.
In fact, the recommendation I have to Cameron is to save the effort, and use
the freely available STL implementation of linked lists.
#include 
int main(void)
{
  std::list list_of_mytype;
  return 0;
}
(Not all compilers currently will require the "std::" part.)
 >  dll.h - unsorted double linked list
 KC> PS: Don't use "dll" for the name of your library, or it could conflict
 KC> with some other compilers or libraries (DLL = Windows Dynamic Link
 KC> Library). 
While I would agree dll.h is a poor name, I doubt that anyone would have an
API header "dll.h"... neither Windows nor OS/2 does, and unix has shared
libraries (.a files), not DLL's.
... I didn't cheat, I just changed the rules!!
___ Blue Wave/OS2 v2.30
--- FastEcho 1.46
---------------
* Origin: House of Fire BBS - Toronto - (416)601-0085 - v.34 (1:250/536)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.