Threads can now publish themselves as a service which means they can be looked up by type. Services are published into the namespace via the URI "/sys/services/{qname}". See discussion.
Native and Non-storage Fields
I relaxed the rules for fields used in const classes. This includes the following breaking API changes:
Log.setLevel => level
File.setModified => modified
Both of these methods where changed into fields. See discussion.
Try, Catch, Finally
These blocks can now use a single statement or a {} block (just like if, for, while). See discussion.
// old way
try
{
somethingDangerous
}
catch (Err e)
{
e.trace
}
// optional new way
try
somethingDangerous
catch (Err e)
e.trace
brian Thu 29 May 2008
The latest build is posted and the online docs updated. Lots of goodies:
Email
The biggest new feature is support for sending email via SMTP. To learn more:
You can send multi-part MIME emails which (in my humble opinion) really shows off the strength of Fan's ability to do declarative style programming:
// create simple plain text email email := Email { to = ["[email protected]"] from = "[email protected]" subject = "hi" body = TextPart { text = "hello world" } } // configure smtp mailer and send email mailer := SmtpClient { host = "mail.foo.com"; username = "bob"; password = "pw" } mailer.send(email)As part of the email feature, I added some new sys APIs:
Uri.mimeTypemethodFile.mimeTypemethodWell Known Services
Threads can now publish themselves as a service which means they can be looked up by type. Services are published into the namespace via the URI "/sys/services/{qname}". See discussion.
Native and Non-storage Fields
I relaxed the rules for fields used in const classes. This includes the following breaking API changes:
Both of these methods where changed into fields. See discussion.
Try, Catch, Finally
These blocks can now use a single statement or a {} block (just like if, for, while). See discussion.
// old way try { somethingDangerous } catch (Err e) { e.trace } // optional new way try somethingDangerous catch (Err e) e.traceChange Log
Build 1.0.27 (28 May 08)