[pygccxml-development] Re: low level vs high level API
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2006-03-07 06:07:46
|
On 3/6/06, Matthias Baas <ba...@ir...> wrote: > Hi, > > this mail is a general reply to the previous mails posted. I think > there's still some confusion among me and Allen about the last changes > to pyplusplus (module_builder_t, decl_wrappers, etc). So I'd just like > to mention a few points and check if we've already agreed on them or if > there are still different views (which may have led to the confusion): Funny, this is exactly what I did yerstaday. I will try to update Wiki today. But I also will post my file here. > - The final version of pyplusplus will have two "separate" APIs, a low > level/internal API and a high level API. Is this already general consensu= s? Yes. I think code creators and file writers is low level, declarations and declarations wrappers/decorators is concept that user should be familiar with > - The internal API is what pyplusplus already had when I first tried it > out a few weeks ago. A user could just use this API and create bindings. > In this case, his driver script may be somewhat verbose but he has full > control over pyplusplus. > > - The high level API is a mere convenience for the user to express > things more concisely. This API refers to the internal API to implement > its stuff. Currently, Allen's pypp_api module constitutes the high level > API. Allen pypp_api is the only high level API! > If I've understood Roman correctly, I believe his new module_builder_t > and decl_wrapper classes should already be seen as high level API, > replacing pypp_api, right? No, no, no. I just hate when I my all tests fail. So I created something mi= nimal I can get my tests run. > What I liked before those classes was the > strict separation between low level API and high level API. It was clear > whenever I was using something "low level" (a class with _t suffix) and > something "high level" (from pypp_api or initially also from my own > version). This distinction has become somewhat blurred and the high > level and low level stuff have become somewhat intermingled. As there is > no documentation yet, the only hint would be the sources themselves but > they don't provide any information whether something is considered to be > part of the low level or the high level API. I don't understand > So what I'm missing is documentation about the low level API that Allen > and I could rely on to experiment with various high level APIs. Maybe > some ideas will lead to modifications to the low level part of > pyplusplus but when I was creating my own API version I was quite > pleased to see that the previous internal API has already allowed > expressing almost everything I needed. So it was not that bad at all. It was confusing at least. Try to remember your self with all those recursive flags? More over, if you would use old API, you will need to pay for: scanning declarations tree and code creators tree more then necessary > - Matthias - > > -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |