Thread: [Nice-commit] Nice/web install.xml,1.10,1.11 language.html,1.21,1.22 manual.xml,1.32,1.33 safety.xml
Brought to you by:
bonniot
From: <lv...@pr...> - 2004-01-24 21:51:00
|
Update of /cvsroot/nice/Nice/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5749 Modified Files: install.xml language.html manual.xml safety.xml visitor.html Log Message: spelling fixes courtesy of ispell -H Index: install.xml =================================================================== RCS file: /cvsroot/nice/Nice/web/install.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** install.xml 16 Dec 2003 12:49:02 -0000 1.10 --- install.xml 24 Jan 2004 21:50:23 -0000 1.11 *************** *** 157,161 **** <para> There are no specific instructions for other operating systems. ! Howevever &nice; can be used on any system that works with &java;. If you are in this situation, please <ulink url="mailto:bo...@us...">contact me</ulink> --- 157,161 ---- <para> There are no specific instructions for other operating systems. ! However &nice; can be used on any system that works with &java;. If you are in this situation, please <ulink url="mailto:bo...@us...">contact me</ulink> Index: language.html =================================================================== RCS file: /cvsroot/nice/Nice/web/language.html,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** language.html 23 Dec 2003 11:31:46 -0000 1.21 --- language.html 24 Jan 2004 21:50:23 -0000 1.22 *************** *** 17,21 **** Nice programming language. The goal is to help you write your first Nice programs. It does not describe every feature of the language, nor gives ! it a complete description of the powerfull type system. <br> --- 17,21 ---- Nice programming language. The goal is to help you write your first Nice programs. It does not describe every feature of the language, nor gives ! it a complete description of the powerful type system. <br> *************** *** 151,155 **** <a href="http://nice.sourceforge.net/cgi-bin/twiki/view/Doc/FunctionsAndMethods"> ! more detailed introduction to methods in Nice</a> on the wiki. <br> --- 151,155 ---- <a href="http://nice.sourceforge.net/cgi-bin/twiki/view/Doc/FunctionsAndMethods"> ! more detailed introduction to methods in Nice</a> on the Wiki. <br> *************** *** 160,164 **** Classes and interfaces can have type parameters. For example, the <tt>Collection</tt> ! interface is parametrized by the type of its elements: <p> <PRE> --- 160,164 ---- Classes and interfaces can have type parameters. For example, the <tt>Collection</tt> ! interface is parameterized by the type of its elements: <p> <PRE> *************** *** 198,202 **** of type <tt>Collection<int></tt> and <tt>LinkedList<int></tt>, while it is not with types <tt>Collection<String></tt> and <tt>String</tt>. ! <p>This approach is more sensible than Java's one, where the laters would be allowed and would always return false (not even raising a runtime error), while it is very likely a bug to compare a collection of strings to a string. --- 198,202 ---- of type <tt>Collection<int></tt> and <tt>LinkedList<int></tt>, while it is not with types <tt>Collection<String></tt> and <tt>String</tt>. ! <p>This approach is more sensible than Java's one, where the latter would be allowed and would always return false (not even raising a runtime error), while it is very likely a bug to compare a collection of strings to a string. *************** *** 208,217 **** <h2>Precise types</h2> ! Java's type system is too simple to express many usefull types. For instance, let's suppose we want to declare the method <tt>filter</tt> on collections. This method applies a function to each element of the collection, and returns a new collection containing the elements for which that function returns <tt>true</tt>. ! Futhermore, the new collection is an instance of the same class as the original collection: <tt>filter</tt> applied to a <tt>List</tt> return a new <tt>List</tt>, --- 208,217 ---- <h2>Precise types</h2> ! Java's type system is too simple to express many useful types. For instance, let's suppose we want to declare the method <tt>filter</tt> on collections. This method applies a function to each element of the collection, and returns a new collection containing the elements for which that function returns <tt>true</tt>. ! Furthermore, the new collection is an instance of the same class as the original collection: <tt>filter</tt> applied to a <tt>List</tt> return a new <tt>List</tt>, *************** *** 348,355 **** <ul> <li> ! <b>No casts</b>. We claim that our powerfull type system makes it possible to avoid nearly every cast used in other object-oriented languages (say 95% of them!). For the 5% remaining, it is possible to write methods that ! do the same job, except you have to explicitely write what happens if the "cast" fails, which is a nice property.</li> --- 348,355 ---- <ul> <li> ! <b>No casts</b>. We claim that our powerful type system makes it possible to avoid nearly every cast used in other object-oriented languages (say 95% of them!). For the 5% remaining, it is possible to write methods that ! do the same job, except you have to explicitly write what happens if the "cast" fails, which is a nice property.</li> *************** *** 381,385 **** <b>Functional arguments</b>. A function or a method can have functional arguments. The syntax for functional types is <tt>(T1, T2, ..., Tn) ! -> T</tt>. The parentheses can be ommited if there is only one argument type: <tt>int->int</tt>. </li> --- 381,385 ---- <b>Functional arguments</b>. A function or a method can have functional arguments. The syntax for functional types is <tt>(T1, T2, ..., Tn) ! -> T</tt>. The parentheses can be omitted if there is only one argument type: <tt>int->int</tt>. </li> *************** *** 438,446 **** It is possible to use java classes and methods from Nice programs. This ! is a great advantage, since it gives access to the gigantic and evergrowing set of Java libraries. <p>One can just use java classes in types, and call java methods in Nice ! code. It is not necessary to explicitely import classes or methods. An ! import statement can be used if one does not want to reapeat a package name. <p><tt>import java.io.*;</tt> --- 438,446 ---- It is possible to use java classes and methods from Nice programs. This ! is a great advantage, since it gives access to the gigantic and ever-growing set of Java libraries. <p>One can just use java classes in types, and call java methods in Nice ! code. It is not necessary to explicitly import classes or methods. An ! import statement can be used if one does not want to repeat a package name. <p><tt>import java.io.*;</tt> Index: manual.xml =================================================================== RCS file: /cvsroot/nice/Nice/web/manual.xml,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** manual.xml 18 Dec 2003 00:58:20 -0000 1.32 --- manual.xml 24 Jan 2004 21:50:23 -0000 1.33 *************** *** 834,838 **** of the arguments are used to try to disambiguate which method must be called. If only one method is applicable, it is called. ! Moreoever, if several methods are applicable, but one has a more restricted domain than all the others, it is chosen <footnote> --- 834,838 ---- of the arguments are used to try to disambiguate which method must be called. If only one method is applicable, it is called. ! Moreover, if several methods are applicable, but one has a more restricted domain than all the others, it is chosen <footnote> *************** *** 986,990 **** </para> <example> ! <title>String concatentation</title> <programlisting lang="nice"><![CDATA[ String name = "Nice"; --- 986,990 ---- </para> <example> ! <title>String concatenation</title> <programlisting lang="nice"><![CDATA[ String name = "Nice"; *************** *** 1133,1137 **** </para> <para> ! In most cases, characters should be treatead as abstract entities and not as the numbers that happen to encode them. Therefore, the <literal>char</literal> type is not a numeric type in Nice. --- 1133,1137 ---- </para> <para> ! In most cases, characters should be treated as abstract entities and not as the numbers that happen to encode them. Therefore, the <literal>char</literal> type is not a numeric type in Nice. Index: safety.xml =================================================================== RCS file: /cvsroot/nice/Nice/web/safety.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** safety.xml 23 Jan 2004 00:30:43 -0000 1.10 --- safety.xml 24 Jan 2004 21:50:23 -0000 1.11 *************** *** 26,30 **** Programming is a complex and error prone task. The most obvious consequence of this fact is the presence of bugs in programs. Every ! user can experience that, for most softwares, there are are ways to use it that lead to inappropriate results, internal error messages or even termination of the program, if not of the whole computer. A --- 26,30 ---- Programming is a complex and error prone task. The most obvious consequence of this fact is the presence of bugs in programs. Every ! user can experience that, for most software, there are are ways to use it that lead to inappropriate results, internal error messages or even termination of the program, if not of the whole computer. A *************** *** 232,236 **** In most object-oriented languages, methods are selected at run time depending on the class of the first argument. Because this first ! argument has such a distinct role, it is syntaxically separated from the others, and place before the name of the method, before a dot. However, it is sometimes necessary to select a method depending --- 232,236 ---- In most object-oriented languages, methods are selected at run time depending on the class of the first argument. Because this first ! argument has such a distinct role, it is syntactically separated from the others, and place before the name of the method, before a dot. However, it is sometimes necessary to select a method depending *************** *** 476,480 **** very useful in practice. Code using arrays contains a few idiomatic patterns that occur repeatedly: iterating through the elements of an ! array, finding an element matching a certain criterium, ... These are typically done using loops. Besides being a little tedious, these patterns open the opportunity for mistakes in the indexes, which leads --- 476,480 ---- very useful in practice. Code using arrays contains a few idiomatic patterns that occur repeatedly: iterating through the elements of an ! array, finding an element matching a certain criterion, ... These are typically done using loops. Besides being a little tedious, these patterns open the opportunity for mistakes in the indexes, which leads Index: visitor.html =================================================================== RCS file: /cvsroot/nice/Nice/web/visitor.html,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** visitor.html 16 Jan 2004 16:48:48 -0000 1.4 --- visitor.html 24 Jan 2004 21:50:23 -0000 1.5 *************** *** 91,95 **** would be added to each class. <p> ! Anothe possiblity would be to define a static method in the new package. But then it would be necessary to test the argument with <tt>instanceof</tt> and use downcasts. --- 91,95 ---- would be added to each class. <p> ! Another possibility would be to define a static method in the new package. But then it would be necessary to test the argument with <tt>instanceof</tt> and use downcasts. *************** *** 174,180 **** <h2> ! Comparison of the two approches</h2> Multi-methods allow to solve the situation at which the Visitor pattern ! aims, without carrying its disavantages: <ol> <li> --- 174,180 ---- <h2> ! Comparison of the two approaches</h2> Multi-methods allow to solve the situation at which the Visitor pattern ! aims, without carrying its disadvantages: <ol> <li> |