Arsen Arsenović wrote: > It's not reasonable to expect headers not to use the identifier 'T' I think.
Well, the GNU libstdc++ uses only identifiers that start with '_' as template parameter names: $ grep -r '<typename' /usr/include/c++/ | sort -u /usr/include/c++/15/any: template<typename... _Args> /usr/include/c++/15/any: template <typename _Res, typename _Tp, typename... _Args> /usr/include/c++/15/any: template<typename> struct _Never_valueless_alt; // see <variant> /usr/include/c++/15/any: template<typename _Tp> /usr/include/c++/15/any: template<typename _Tp> /usr/include/c++/15/any: template <typename _Tp, typename... _Args, /usr/include/c++/15/any: template <typename _Tp, typename... _Args> /usr/include/c++/15/any: template <typename _Tp, typename... _Args> /usr/include/c++/15/any: template <typename _Tp, typename... _Args, typename _VTp = decay_t<_Tp>, /usr/include/c++/15/any: template<typename _Tp, typename _Safe = is_nothrow_move_constructible<_Tp>, ... /usr/include/c++/15/variant: template <typename... _UTypes, typename _Tp> /usr/include/c++/15/variant: template<typename _Variant> /usr/include/c++/15/variant: template<typename _Variant, typename __indices> /usr/include/c++/15/variant: template<typename _Var, typename... _Types> /usr/include/c++/15/variant: template<typename _Visitor, typename... _Variants> /usr/include/c++/15/variant: template <typename _Visitor, typename _Variant, size_t... _Idxs> /usr/include/c++/15/vector: template<typename _Out> /usr/include/c++/15/vector: template<typename _Tp> /usr/include/c++/15/vector: template<typename _Tp, typename _Alloc, /usr/include/c++/15/vector: template<typename _Tp, typename _Alloc, typename _Predicate> The reason is obviously that identifiers that don't start with '_' are in the application's namespace. > _T_ is a reserved identifier; all identifiers starting with an > underscore followed by a capital letter are. See [lex.name]p4.1 Yes, this (practically) guarantees that application code will not be using '_T_'. Thus Gnulib can use it. > It should do so after all other includes, IMO. This is the kind of constraint that makes programming hard. Guess why PASCAL's restriction "first you have to define all types, then all variables - not intermixed" did not survive in modern programming languages. > Regarding the commit message: this doesn't really make the templates > more hygienic, I think (as templates can't leak the identifier anyway), > they just make them not break under the specific "unhygienic" context in > clisp itself. I took the notion of "hygienic" as meaning no collision with application-defined symbols from Scheme [1][2]. Bruno [1] https://docs.scheme.org/guide/macros/ [2] https://en.wikipedia.org/wiki/Hygienic_macro
