Showing content from http://mail.python.org/pipermail/python-dev/attachments/20060418/626d06f1/attachment.html below:
<div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style="direction: ltr;">why include Construct?<br>* the struct module is very nice, but very limited and non-pythonic as well
<br>* pure python (no platform/security issues)</div></blockquote><div><br> IMHO this is a drawback. More on this below.<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style="direction: ltr;">* lots of people need to parse and build binary data structures, it's not an esoteric library
<br>* license: public domain<br>* quite a large user base for such a short time (proves the need of the community)</div></blockquote><div><br> Indeed, I wish I had known about this a year ago; it would have saved me a lot of work. Of course it probably didn't exist a year ago... :(
<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style="direction: ltr;">* easy to use and extend (follows the componentization pattern)
<br>* declarative: you don't need to write executable code for most cases
</div></blockquote><div><br> Well, declarative is less flexible. OTOH declarative is nice in the way it is more readable and allows more optimisations.<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style="direction: ltr;">why not:<br>* the code is (very) young. stable and all, but less than a month on the loose. <br>* new features may still be added / existing ones may be changed in a non-backwards-compatible manner
<br><br>so why am i saying this now, instead of waiting a few months for it to maturet?
<br>well, i wanted to get feedback.
those of you who have seen/used the library, please tell me what you think:<br>* is it suitable for a standard library?</div></blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style="direction: ltr;">* what more features would you want?<br>* any changes you think are necessary?</div></blockquote><div><br> This is a very nice library indeed. But the number one feature that I need in something like this would be to use C. That's because of my application specific requirements, where i have observed that reapeatedly using
struct.pack/unpack and reading bytes from a stream represents a considerable CPU overhead, whereas the same thing in C would be ultra fast.<br><br> IMHO, at least in theory Construct could have small but fast C extension to take care of the encoding and decoding, which is the critical path. Everything else, like the declaration part, can be python, as it is usually done once on application startup.
<br><br> If you agree to go down this path I might even be able to volunteer some of my time to help, but it's not my decision.<br> <br> Best regards.<br></div></div>
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4