[C++-sig] Re: Pyste: support for user defined code.

Nicodemus nicodemus at globalite.com.br
Sun Aug 17 23:16:51 CEST 2003


David Abrahams wrote:

>Nicodemus <nicodemus at globalite.com.br> writes:
>
>  
>
>>Agreed. There's not enough cases to justify the use of constants. I think:
>>
>>header_code()
>>    
>>
>
>  include('foo.hpp')
>  
>

Agreed, actually, I forgot such a function already exists, it is named 
Include. So, header_code was removed. 8)

>>declaration_code()
>>global_declaration_code()
>>    
>>
>
>  These two names are not very distinct.  What's the difference?
>  
>

declaration goes inside the empty namespace, together with the wrapper 
classes for instance. global declaration goes outside this namespace.

>>module_code()
>>    
>>
>
>  hello.inject('''
>        // my C++ code here
>  ''')
>
>  
>  hello.World.inject('''
>        // my C++ code here
>  ''')
>  
>

I assume "hello" is the module name. That doesn't work because a Pyste 
file doesn't know in which module it will generate the code (this is 
given in the command line). Assuming "hello.World" is a class, then 
"inject" will put the code before or after the class? I find that a 
code() call more clear than an inject method.





More information about the Cplusplus-sig mailing list