📄 x23632.html
字号:
<HTML><HEAD><TITLE>Interface Design Convention</TITLE><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.53"><LINKREL="HOME"TITLE="Documentation Set for Swarm 2.1.1"HREF="set.html"><LINKREL="UP"TITLE="Library Interface Conventions"HREF="swarm.library.sgml.appendix.html"><LINKREL="PREVIOUS"TITLE="Global Object Symbols"HREF="x23625.html"><LINKREL="NEXT"TITLE="Documentation Structure"HREF="x23644.html"></HEAD><BODYCLASS="SECT1"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="NAVHEADER"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">Documentation Set for Swarm 2.1.1</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="x23625.html">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Appendix B. Library Interface Conventions</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="x23644.html">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="SECT1"><H1CLASS="SECT1"><ANAME="AEN23632">B.6. Interface Design Convention</A></H1><P>A variety of rules on naming and declaration of object types,symbols, and messages are followed by many of the Swarmlibraries. These rules help establish a basic consistency on thelibrary interfaces. Following is a list of such conventions that applyto a public library interface, some but not all of which are derivedfrom standard Smalltalk or Objective C coding practice:</P><P></P><UL><LI><P>Names of global object constants are capitalized. In the public interface, such names include types and symbols.</P></LI><LI><P>Recapitalization separates words of a compound name (e.g., GridTurtle). Underscores are generally not used.</P></LI><LI><P>Message names start with a lower-case character, and are named using verbs. Nouns that represent gettable or settable components of object state (e.g., Direction of a GridTurtle), are prefixed by get or set to indicate the action being performed.</P></LI><LI><P>The Smalltalk convention that a message return the receiver of a message if there is no other specific return value is generally *not* followed. If there is no specific return value needed from a message the return type is declared (void).</P></LI></UL></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="x23625.html">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="set.html">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="x23644.html">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Global Object Symbols</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="swarm.library.sgml.appendix.html">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Documentation Structure</TD></TR></TABLE></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -