Orc release 2.0.0 (Thu, 21 Apr 2011)
Orc 2.0 is a new major revision of the Orc implementation. The core codebase has been rewritten in Scala, and the internal structure of the compiler and runtime have been altered and improved substantially.
The user-level surface language has also changed. Orc 2.0 is not backwards-compatible with previous versions of Orc. Here are the detailed release notes on the user-visible changes to the language. Guidance on how to modify programs written in the previous version of Orc to make them run under Orc 2.0 is on the UpgradingYourProgramToOrc2.0 wiki page.
See our Downloads page for detailed instructions on how to download and use Orc within Eclipse, locally within your web browser, or from the command line.
Added
- Support for records: record expressions, record types, record patterns, and record extension using
+ - Function clauses may have arbitrary guard conditions.
- New
weblibrary section, with sitesBrowse,HTTP,ReadJSON, andWriteJSON - New
xmllibrary section, with XML manipulation sites. - Enhanced parse error messages.
- Enhanced compiler and runtime error messages, with links into the Orc Wiki.
- The
.oilcompiled representation of Orc programs now has a standard public format, given byorc.csres.utexas.edu/oil.xsd. - Orc compiler and runtime support JSR 223.
- Orc 2.0 has a full Reference Manual.
- Added site
IterableToStreamto convert Java objects implementingIterableto a more Orc-appropriate idiom. - Any value with an
applymember can be called; the call is forwarded to theapplymember. - Any value with an
unapplymember can be used in a call pattern; the match target is forwarded to theunapplymember.
Modified
def capsuleis nowdef class.siteis nowimport site.classis nowimport class.typeis nowimport typefor external types. Type aliases and datatypes remain unchanged.- The three
importdeclarations require the Java class name to be a quoted string. - The comparison operators
<and>are now<:and:>. ifsite is nowIft.Ifthas a counterpart,Iff.IArrayis nowTable.Rtimeris nowRwait.Bufferis nowChannel.BoundedBufferis nowBoundedChannel.- "Nonblocking" sites, with the suffix '
nb', are now "definite" sites, with the suffix 'D'. - Site names are now capitalized by convention. This has changed many sites in the standard library:
Let,Print,Println,Error,Read,Write,Floor,Ceil,Random,URandom. - Keywords are reserved. (Previously one could, for example, define a function named "stop".)
- Orc identifiers may now use Unicode letters.
- Fixed bugs in
FloorandCeil. - Arrays no longer have any methods. They have one field,
length. Forslice, use the new functionsliceArray. - Arrays no longer pattern match as lists. Use
arrayToList. - Descendants of
Iterableno longer pattern match as lists. UseiterableToList. - All Orc programs and includes are interpreted using the UTF-8 character encoding.
Removed
- Tracing facilities have been removed.
- Experimental support for Orc exception handling syntax has been removed.
- Special treatment of interaction between
if then elseand>>in parser has been removed. if thenwithoutelseis no longer supported. Always useif then else.- Equality (
=x) pattern is gone. Use a guard on the clause instead. - Special treatment of newlines has been removed. Ambiguous syntax can be eliminated with the insertion of
signal >>. - Curried definition of functions, lambdas, and function types are no longer allowed. Expand these explicitly as chained lambdas instead.
Recordhas been removed; use primitive records instead.SetandMaphave been removed; use Scala or Java counterparts instead.cathas been removed, use+on strings instead.Clockhas been removed, useRclockinstead.LtimerandwithLtimerhave been removed.Applyhas been removed.Threadhas been removed.()as a synonym forsignalhas been removed.- All uses of and dependencies on Kilim have been removed.