Stroustrup (and many others on the C++ committee, including myself) wanted to play down the use of #include or even remove it. Backward compatibility with C made that impossible unfortunately. That's why ISO C++ has this form of 'include':

#include <stdio>

The intent is to allow compilers to implement a form of namespace import without needing to physically include the file as part of preprocessing. There was quite a sentiment on the C++ committee that the preprocessor was the root of many evils and should be avoided as much as possible. We even discussed adding a Java-like "import" directive so that standard C++ did not need to rely on the preprocessor at all.

So "includes are a very important part of C++" is not actually true.

You're arguing that because the designers didn't like it, it wasn't actually important. However, if you look to implementation land, you will see that the vast majority of C++ applications use includes.

I understand that you're not actually recommending this practice but this is a pretty glaring "implementation detail" that programmers would need to be aware of. How many average CFers are familiar with stacks and call frames? Sure, you can just mandate in your coding guideline that "this is how we do things" but at the end of the day, developers working on your system need to have an understanding of how you implemented things (so that if they fail to follow your coding guidelines, they stand a chance of being able to work out why their code is failing).

Again, that was a specific practice to get around the slowness of custom tags in previous implementations of CF. It certainly was a practice that was tied to a very specific implementation of CFML and was documented as such, but it does debunk that notion that code inside includes couldn't have their own namespace.

Given the pain that the C++ committee went through with namespaces and the "using" and "using namespace" directives - as well as my experience with Pascal dialects that supported "with" - I totally agree that I wouldn't want to see those sorts of tags added to CF!

Spend anytime with a VB 6 application and you'll want to kill the author for using with.

-Matt

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email.


CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to