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
web
library section, with sitesBrowse
,HTTP
,ReadJSON
, andWriteJSON
- New
xml
library section, with XML manipulation sites. - Enhanced parse error messages.
- Enhanced compiler and runtime error messages, with links into the Orc Wiki.
- The
.oil
compiled 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
IterableToStream
to convert Java objects implementingIterable
to a more Orc-appropriate idiom. - Any value with an
apply
member can be called; the call is forwarded to theapply
member. - Any value with an
unapply
member can be used in a call pattern; the match target is forwarded to theunapply
member.
Modified
def capsule
is nowdef class
.site
is nowimport site
.class
is nowimport class
.type
is nowimport type
for external types. Type aliases and datatypes remain unchanged.- The three
import
declarations require the Java class name to be a quoted string. - The comparison operators
<
and>
are now<:
and:>
. if
site is nowIft
.Ift
has a counterpart,Iff
.IArray
is nowTable
.Rtimer
is nowRwait
.Buffer
is nowChannel
.BoundedBuffer
is 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
Floor
andCeil
. - 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
Iterable
no 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 else
and>>
in parser has been removed. if then
withoutelse
is 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.
Record
has been removed; use primitive records instead.Set
andMap
have been removed; use Scala or Java counterparts instead.cat
has been removed, use+
on strings instead.Clock
has been removed, useRclock
instead.Ltimer
andwithLtimer
have been removed.Apply
has been removed.Thread
has been removed.()
as a synonym forsignal
has been removed.- All uses of and dependencies on Kilim have been removed.