root/trunk/raw_html/vsboost.html

Revision 62, 2.7 kB (checked in by KirkMcDonald, 2 years ago)

Added Linux support to docs; added raw_html for all the world to see.

Line 
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4     <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
5     <link href="pyd.css" rel="stylesheet" type="text/css">
6     <title>Pyd vs. Boost.Python</title>
7 </head>
8
9 <body>
10 %(nav)s
11 <div id="content">
12
13 <h1>Pyd vs. Boost.Python</h1>
14
15 <p><i>(This page is still being filled out, mostly because I am still adding features to Pyd. I am open to suggestions for additions to this page.)</i></p>
16
17 <p><a href="http://www.boost.org/libs/python/doc/">Boost.Python</a> is a C++ library which fills much the same role that Pyd does for D. The two libraries are far from identical, however. Pyd has a number of advantages over Boost.Python, and Boost.Python has a few features that Pyd lacks. Here are some of the differences.</p>
18
19 <h3><u>Advantages of Pyd</u></h3>
20
21 <p><b>Pyd builds faster than Boost.Python.</b> C++, especially when using the Boost libraries, is notorious for long compilation times (sometimes in the range of hours). D, on the other hand, is gaining a reputation for very fast compilation times. Pyd builds extremely quickly (usually in mere seconds).</p>
22
23 <p><b>Pyd runs faster than Boost.Python.</b> I have yet to directly compare the runtime performance of Pyd and Boost.Python, but Pyd manages to do most of the work involved with exposing functions at compile-time. I am confident that Pyd has a reduced runtime overhead compared to Boost.Python.</p>
24
25 <p><b>Pyd directly supports default arguments.</b> Pyd operates on function aliases rather than function pointers. Therefore, it can call a function and take advantage of its default arguments directly, without generating a set of wrapper functions like Boost.Python has to.</p>
26
27 <p><b>Pyd can do more automatically than Boost.Python can.</b> Pyd can automatically derive the names of functions and classes, can automatically detect how many default arguments a function has, and can automatically wrap all of the operator overloads in a class.</p>
28
29 <h3><u>Advantages of Boost.Python</u></h3>
30
31 <p><b>Boost.Python supports function overloading better than Pyd.</b> You can wrap multiple C++ functions under the same name with Boost.Python. Pyd does not support this, as it operates on a slightly lower level than Boost.Python. (Python does not directly support this, so Pyd doesn't, either.) Pyd must expose different function overloads as different Python functions, with different names.</p>
32
33 <p><b>Pyd cannot support default member function arguments.</b> This is a limitation of D. D does not directly support pointers-to-member-functions, preferring the more general concept of delegates. This means that there is no way to directly call an alias of a member function in D.</p>
34
35 </div>
36
37 </body>
38 </html>
Note: See TracBrowser for help on using the browser.