[C++-sig] Re: Pyste: support for user defined code.
David Abrahams
dave at boost-consulting.com
Sun Aug 17 22:06:22 CEST 2003
Nicodemus <nicodemus at globalite.com.br> writes:
> Prabhu Ramachandran wrote:
>
>>>>>>>"N" == nicodemus <nicodemus at globalite.com.br> writes:
>>>>>>>
>>
>> N> Hmm, agreed, those "add" are redundant anyway, and I like
>> N> "code" better than "include". 8)
>>
>> N> The names in caps indicates the sections in the source file
>> N> where the code should go:
>>
>>Rather than using the special all caps MODULE etc. why not just do
>>this:
>>
>> add_header(...)
>> add_declaration(...)
>> add_module(...)
>>
>> or code_header(...)
>> ...
>>
>>or
>>
>> header_code()
>> declaration_code()
>> module_code()
>>
>>I'd prefer any of these to code(MODULE, <code>) etc. since it looks
>>much cleaner.
>>
>
> Agreed. There's not enough cases to justify the use of constants. I think:
>
> header_code()
include('foo.hpp')
> declaration_code()
> global_declaration_code()
These two names are not very distinct. What's the difference?
> module_code()
hello.inject('''
// my C++ code here
''')
hello.World.inject('''
// my C++ code here
''')
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
More information about the Cplusplus-sig
mailing list