[Grace-core] Programming with Grace

Kim Bruce kbbruce47 at gmail.com
Fri Jun 17 15:16:13 PDT 2016


A new version of the text “Programming in Grace” is now available on-line at http://www.cs.pomona.edu/~kim/ProgrammingWithGrace/bookmain.pdf <http://www.cs.pomona.edu/~kim/ProgrammingWithGrace/bookmain.pdf>

The main differences between the previous version and this one are to reflect the changes to syntax in the language (e.g., elmination of “dotted” classes), some additions to the GUI chapter, and corrections of various typos.

Here is a brief summary of the changes:

1.  “Dotted” classes replaced by undotted classes, in most cases with the most obvious modifications.  E.g. framedRect.at <http://framedrect.at/>(…) is replaced by framedRectAt(…).  The keyword “inherits” has been changed to “inherit”.

2.  In most cases, size parameters consisting of a width and height have been replaced by a single dimensions parameter of type Point.

3.  The GUI class selectBox.from has been replaced by menuWithOptions.

4.  Var args have been replaced by lineUps (of the form [1,2,3,4]).  Lineups are a very primitive list-like construct.

5.  Constructors for lists have been changed.  Rather than writing list.withAll(…), they are now written using lineUps as list[a,b,c,d].

6.  Type parameters are now written with [[T]] rather than <T>.  Thus it is now List[[T]] rather than List<T>

7.  The use of super has been replaced by a mechanism for providing aliases of inherited methods.

There are a few other very minor changes, but those are the main ones that affect programs you are likely to write.

Please send any corrections/comments to me.

Kim Bruce
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailhost.cecs.pdx.edu/pipermail/grace-core/attachments/20160617/de77f86c/attachment.html>


More information about the Grace-core mailing list