Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: OT: Hygiene in C++ templates?
Lynn Winebarger <owinebar@indiana.edu> writes:

>     As the subject indicates, though, I'd like to know whether C++
> templates are hygeinic or not.

No. There are only rules which somewhat increase hygiene, by making
function calls which don't involve template parameters in arguments
resolved at the point of template definition. Other calls are resolved
in a combination of both environments.

In the context of C++ it would not make sense to make all calls in
templates hygienic, because compile-time dispatch relies on calling
an overloaded functions with a particular name - perhaps one defined
after the template.

The problem of hygiene in the other direction, preventing pieces of
code from capturing definitions introduced by the template, doesn't
exist because you can't pass pieces of code to a template.

--
__("<         Marcin Kowalczyk
\__/       qrczak@knm.org.pl
^^     http://qrnik.knm.org.pl/~qrczak/

Report this thread to moderator Post Follow-up to this message
Old Post
Marcin 'Qrczak' Kowalczyk
10-31-04 01:56 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Scheme archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:45 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.