r1592: Updated to 0.2.10
[uffi.git] / doc / intro.sgml
index df58ab6683625a9f0144e945f97ab212b7cbd7f5..6f8b9b6f7e02744127624e191c9d62fc9e5b8183 100644 (file)
@@ -48,15 +48,52 @@ particular C-library.
   </sect1>
 
     <sect1>
-      <title>Design Overview</title>
-      <para>
-       &uffi; was designed as a cross-implementation compatible 
-       <emphasis>Foreign Function Interface</emphasis>. Necessarily,
-       only a common subset of functionality can be
-       provided. Likewise, not every optimization for that a specific
-       implementation provides can be supported. Wherever possible,
-       though, implementation-specific optimizations are invoked.
-      </para> 
+      <title>Design</title>
+      <sect2>
+       <title>Overview</title>
+       <para>
+         &uffi; was designed as a cross-implementation 
+         compatible <emphasis>Foreign Function Interface</emphasis>.
+         Necessarily,
+         only a common subset of functionality can be
+         provided. Likewise, not every optimization for that a specific
+         implementation provides can be supported. Wherever possible,
+         though, implementation-specific optimizations are invoked.
+       </para> 
+      </sect2>
+
+      <sect2>
+       <title>Priorities</title>
+       <para>
+         The design of &uffi; is dictated by the order of these priorities:
+       </para>
+       <itemizedlist>
+         <listitem>
+           <para>
+             Code using &uffi; must operate correctly on all
+             supported implementations.
+           </para>
+         </listitem>
+         <listitem>
+           <para>
+             Take advantage of implementation-specific optimizations. Ideally, 
+             there will not a situation where an implementation-specific
+             &ffi; will be chosen due to lack of optimizations in &uffi;.
+           </para>
+         </listitem>
+         <listitem>
+           <para>Provide a simple interface to developers using
+&uffi;.  This priority is quite a bit lower than the above priorities.
+This lower priority is manifest by programmers having to pass types in
+pointer and array dereferencing, needing to use
+<constant>cstring</constant> wrapper functions, and the use of
+ensure-char-character and ensure-char-integer functions. My hope is
+that the developer inconvenience will be outweighed by the generation
+of optimized code that is cross-implementation compatible.
+           </para>
+         </listitem>
+       </itemizedlist>
+      </sect2>
     </sect1>
 
 </chapter>