JC> CC> I hate the way that templates are done in C++. I'm sure it makes
JC> CC> it easier for the compiler writer, but, it makes the code
nintuitive
JC> CC> and clutered.
JC>
JC> Can you come up with a syntax that's simpler and more intuitive? If you
JC> can come up with an unambiguous syntax, it should be fairly simple to
JC> translate from your syntax to one the compiler can handle. Adding a
JC> filter to the front end of the compilation process is usually quite easy
JC> to handle.
JC> Later,
JC> Jerry.
template ;
// written once in the header of the file
// have the compiler to assume all methods or classes in the header
// file that make a use of "name" are part of a template
classname objectnamt;
// when creating a new instance of a class that uses a template class
My theory is "a program should remember and work for you - not the
other way around".
Once again, I have been thinking about adding a front end to add some
syntatical replacement and add some additional semantic checking - would
be stealing ideas from sun's java to accomplish this.
initialized before used
// this one is a life saver
a class variable must have one initializer no matter
the path chosen
eg
{
String result;
if (condition) {
result = "something";
}
return result;
}
This would return an error because result could be used
before it is initilized, even though all variables (atomic0
are initilzed to zero,null,false or the appropriete.
--- GEcho 1.00
---------------
* Origin: Digital OnLine Magazine! - (409)838-8237 (1:3811/350)
|