Re: [pygccxml-development] Future of pypp_api...
Brought to you by:
mbaas,
roman_yakovenko
From: Allen B. <al...@vr...> - 2006-08-20 20:07:52
|
Roman Yakovenko wrote: > On 8/20/06, Allen Bierbaum <al...@vr...> wrote: > >> I am hesitant to make any changes like this because I don't want to >> offend you or change something in a way that you don't want. > > > :-) This is not the changes I will not like. If you think, that these > change will improve > user experience please do it. Please write what classes you want to be > imported > directly from module_builder package. I will add them tomorrow. > Part of the reason this discussion has very few details is that this isn't something I can easily make a list of for you. It is much more something that I would need to do "on the fly" while working on a project. If it is okay with you, what I suggest is that I will use the Py++ API over the next couple of days. As I find something annoying or that I think could be better I will either: a) fix it in a way that won't break existing code or b) note it and let you know. I have been thinking that one way I could do this is to make an adapter interface that modifies the existing interfaces at run-time to create a new interface that implements the ideas that I have. The idea would be to make it possible for someone to import a single module (or package which is really the same thing) and then have a DSL for them to use. Things I know I would be looking into: - Importing everything that users may need for most cases - Simplified naming convention (so it doesn't look likes classes or interfaces) - Template support by default - Some helper functions that I have found useful and may be helpful for others. - Adding methods to some existing interfaces to make some things simpler I think I can do this in a way that you can take some things into the core if you want to and leave other things out if you want to. The way I would implement this is something like: ---------- module: user_interface.py ----------------- from module_builder import module_builder, <other stuff> from pygccxml.declarations.type_traits import <things> # customize it ModuleBuilder = module_builder def mb_newmethod(self, arg): pass ModuleBuilder.newMethod = mb_newmethod ------------------------------------------------------------ I think you can get the idea. Basically make an interface that adapts the current stuff. Then this interface can keep adapting and changing while still being based on the same code base. And if you choose to pull things on over to core, then we just change the adapter a little bit. I think this would make it so the efforts don't diverge as much. I just don't have the time or energy to spend wasted effort. I need to focus on getting my work done. :) Thoughts? Now to help this get going, Roman, could you comment on the questions I asked on the template page on the wiki today? https://realityforge.vrsource.org/view/PyppApi/TemplateSupport I still don't understand the method you are suggesting could work. I put some comments in there and asked new questions. -Allen |