-- Start: Sunday, July 10, 1994 3:14:23 pm DUtime (EDT)

DanielP turns Recorder on.
BillH says:
Does anybody have something they want to discuss?
Brett's Soccer Ball (BrettK's emissary) says:
sure how about 'why use templates?'
DanielP says:
I guess that we'll improvise an agenda, Brett wants to talk about templates.
Brett's Soccer Ball (BrettK's emissary) says:
I've done the usual exercises but have not used them in a real project
laurap says:
I use them extensively in the cgi/html libraries. They're very convenient, but the g++ implementation is kind of a pain to deal with.
DanielP says:
I did look at the draft chapter, but Laura seems to have read the chap in details, is it suitable so that we definitely make the switch from MI to templates
laurap says:
I think it covers templates nicely, but it's not finished -- the example programs aren't done, nor are the exercises.
(DanielP thinks: didn't look )
laurap says:
I think Grisha wants suggestions for the exercises.
BillH says:
Are we going to reorganize the web tutorial to omit MI, or just note that we will skip that section?
Brett's Soccer Ball (BrettK's emissary) says:
I'd like to see something besides the usual array-as-other-structure exercises
Opal_Guest arrives from nowhere.
DanielP [to laurap]:
What are the problems with using templates on g++?
Opal_Guest waves
BillH [to Opal_Guest]:
Hi
Brett's Soccer Ball (BrettK's emissary) waves to opal_guest
laurap says:
to get a template instantiated, you have to use it in the same file in which it's defined. This means that (for classes) you need to have all the functions inlined or do some special magic with compiler flags and #pragmas.
do you want more details?
Brett's Soccer Ball (BrettK's emissary) says:
ick
DanielP [to BillH]:
The course officially ends on July 31th, I think that chap 9 was suppossed to be the last chap that we will have time to do in the course, and there was suggestion that we replace chap 9 MI by templates if the chap would be ready
Opal_Guest suddenly disappears.
BillH says:
I think templates is more suitable than MI for an introductory C++ course
DanielP [to laurap]:
If we cover templates then the only env that really supports it is Borland so we'll have to figure something for the other
DanielP [to BillH]:
I think that this was the general agreement
BillH says:
Macintosh Symantec supports templates, version 7
Brett's Soccer Ball (BrettK's emissary) says:
"I think metroworks for Mac does also
(DanielP thinks: Bill answered my question before asking! )
Brett's Soccer Ball (BrettK's emissary) says:
not sure if MPW will
BillH says:
I think the template has to be used somewhere in the application, not necessarily the file it is defined in
laurap [to DanielP]:
You can use templates with g++ though, and get around some of those problems -- I described this for template functions in my mail the other day, and the same is basically true for classes. (I think it's too complicated to go into here).
laurap says:
one option would be to have a basic chapter on templates that talks about templates in the c++ language, and to have separate appendices about how to use them for specific compilers...
DanielP says:
What would be the simplest way to incoporate the sample programs in the tut without getting in the details of a particular env
laurap says:
with g++, if you have the templates and everything that uses them in one file, it will work.
BillH [to laurap]:
Can you then use the template in other files?
DanielP [to laurap]:
Is this restriction going to be lift up in the near future?
laurap [to DanielP]:
I don't know. I do know that the implementation is going to change in the next release (the documentation says that the #pragma stuff you need to do if you use separate files will change), but I don't know how.
laurap [to BillH]:
You can use the template if it's been instantiated somewhere. But if you want to instantiate it, it needs to be in the same file (or a file included by that file).
A better way to say that would be that the restriction is on instantiating a template, not on using a version of it.
DanielP [to laurap]:
Is the actual chapter sufficiently complete to be considered "a basic chapter on templates in C++"?
laurap [to DanielP]:
I think so.
But it's not really of the same flavor as the other chapters of the tutorial...
DanielP says:
I think that we'll have to build on this
laurap [to DanielP]:
sorry -- build on what?
DanielP [to laurap]:
On the actual chapter to make it what we'll be covered in this course about templates
DanielP says:
The only problem is how to deal with the diff ways to use templates in all the env
I would say the compilation notes are the place to discuss such issues
laurap says:
I'd hate for the template chapter to get bogged down on implementation details, but on the other hand if we just had examples that worked everywhere, people would get frustrated when they started writing their own.
laurap agrees about using compilation notes.
laurap says:
We could have least-common-denominator examples, and refer people to the compilation notes.
BillH says:
I'm reading a book now discussing this template problem. It gives a suggestion on how to code around it by using a base class to inherit from. I don't know if this is a good idea since it uses (void*) pointers
Brett's Soccer Ball (BrettK's emissary) says:
a student and I talked about the template/(void*) tradeoffs
if the (void*) is hidden (perhaps in a GNA class) it should be ok
I'd rather not have students playing with (void*)
laurap [to BillH]:
that would still leave the instantiation problem. (I use a virtual base class for the CGI class that my template classes are inherited from, and then have other things that use lists of that base class).
BillH says:
The book also gives a second suggestion that the header class includes the usual header code, plus also the implementation code
DanielP says:
I guess that the mailing list would be the right medium to discuss this tradeoff
Diamond_Guest arrives from nowhere.
Diamond_Guest smiles
(BillH thinks: I'm not sure what the template problem (of instantiating it) is really about, since I haven't used templates yet )
Diamond_Guest goes home.
DanielP says:
I would like to discuss the details that needs to be done to get the chap on templates ready asap
laurap [to BillH]:
yes -- you need to do this with g++. If you do *just* this, everything works but takes forever to compile, and you wind up with lots of static functions. If you use some special compiler flags and #pragmas, things compile more quickly but you need to think about instantiating the templaes.
(DanielP thinks: this g++ implementation of templates looks a kludge to me )
laurap [to DanielP]:
okay -- I think it gives a nice overview of templates. The example programs need to be dealt with, we need to come up with exercises, and I think we should write compilation notes for each compiler (I'd volunteer to do that for g++).
BillH says:
I could write compilation notes
laurap [to BillH]:
for what compiler[s]?
BillH says:
I could write compilation notes for Symantec Think C++ version 7, although I might have a problem since I don't have the manual
DanielP says:
maybe we should have example programs that works on all the env, and suggest some exercises that will exploit the diff between the env
I can do it for Borland and (MS) VisualC++
laurap says:
How does instantiation work for these other compilers?
DanielP [to laurap]:
Borland is supposed to follow the Stnadard def, and VisualC++ is using a kludge in the g++ style (maybe even worse)
BillH [to laurap]:
I haven't tried using templates yet
laurap says:
okay -- then it probably is worth it to make the examples work everywhere (if g++ was the only unusual case, it might not have been worth it).
the chapter really needs some new exercises, though.
DanielP says:
is there any exercise in the tut at the moment?
laurap says:
one, but I'm not crazy about it -- it's to use the example template class from the chapter as a base class to define something else.
btw, the chapter as a whole is very nice -- it's just the specific examples and exercises that have problems...
DanielP says:
we should be grateful in this case to ?
Brett's Soccer Ball (BrettK's emissary) has to run, will check the tape for what he misses
BillH says:
Maybe the consultants could submit examples to the consultant discussion list for review
BillH [to Brett's Soccer Ball]:
Bye
DanielP nods
Brett's Soccer Ball (BrettK's emissary) The ball is in the net! GOAL!!
DanielP waves Brett
laurap is sooo sick of socker!
laurap waves Brett
DanielP says:
Not only examples but suggested exercises
What is chap 8 all about?
laurap says:
virtual functions? I'm just guessing...
DanielP says:
Because we have to deliver chap 8 and 9 asap
Who is supposed to proofread chap 8?
laurap says:
so chapter 9 will be the template chapter?
(laurap thinks: apparently no one in this room... )
DanielP says:
I think that we have sufficiently good material (according to Laura) to go ahead with templates, and I don't like the idea to end with MI
BillH nods
laurap says:
do you mean do templates next, or do them after chapter 8?
DanielP says:
We'll leave chap 9 as is, and we will complete the chap on templates for the students to end with it (I think it is chap 13 or something)
If chap 8 is ready soon we should release it, if not, we make a last announcement that will cover chap 8 and the one on templates
(DanielP thinks: we have at most two weeks to do this )
(laurap thinks: the more advanced the material, the more quickly we cover it )
DanielP [to laurap]:
unfortunately, you're right
(DanielP thinks: lessons for future versions )
(laurap thinks: maybe the future textbook will be finished before the next time the course is given )
DanielP [to laurap]:
Not sure, Marcus mentionned the shaky status of the copyrights on the actual tut
laurap [to DanielP]:
speaking of copyrights, I noticed you suggested using problems from Stroustrup -- would we have copyright problems with them?
DanielP [to laurap]:
I was surprised recently because I checked the copyright in the answer book and we can use it for non-commercial use. If we could get a volunteer to html'ised the answer book, we could stuff this into the course mat, it would be a great addition with little effort
laurap [to DanielP]:
yes, that would be great. One thing that exercises can help with a lot, I think, is in showing people why specific features are useful.
is the answer book on-line in any form?
DanielP [to laurap]:
I think so, don't know where exactly, but I think that I saw it somewhere
DanielP says:
Is there anything else to discuss? (always glad to have short meetings :-))
laurap [to DanielP]:
I like S's exponential scale of problem difficulty -- if we could include some from each level in each chapter, people could decide to do all the problems, or all up to level 2 or whatever...
(laurap thinks: especially compared to last week's )
(DanielP thinks: this was Knuth's invention, I think )
BillH says:
I have nothing more to discuss.
laurap says:
neither do I...
DanielP says:
So we have to finish the chap on templates asap and ask for volunteer to html'ise the answer book, I will try to look where is it

-- End: Sunday, July 10, 1994 4:20:33 pm DUtime (EDT)