From: Thomas Leonard <talex5@gm...> - 2008-10-07 19:14:23
OK, Delight 0.2 is now out with loads of changes!
The really big change is that it's now based on D2 (the in-development
version of D) rather than the old D1. In particular, this means:
- New const/invariant system. See http://delight.sourceforge.net/types.html
- Strings are no longer of type char, but invariant(char). i.e.
strings never change (same as Python or Java).
- Closures work. If you define a nested function, it can still access
its parent's variables after the parent has returned.
- Tango doesn't support D2 (not even its D2 branch), so I converted
everything over to use Phobos. I couldn't live without the Layout
class, though, so I cut-and-pasted that in to the Delight standard
library. Might move back to Tango once it works.
Main other changes:
- "cast(Foo) x" now has the maybe type "Foo?". This is because it
returns null if x isn't a Foo.
- Assign-within-if (from D) works, and has been extended to provide a
safe way of removing the maybe qualifier:
Details? lookup(string name):
if Details details = lookup("fred"):
# "fred" not known
- inner classes and static inner classes now work.
- "x in dict" now has a maybe type (it's null if x isn't in the dictionary)
- anonymous functions work ("function(int x): x + 1"). This is like
lambda in Python.
- better support for parsing D code (mainly for importing, but it will
also now compile .d files if you ask it to)
- any object can be implicitly cast to Object (D doesn't allow this)
- treat empty arrays as "false", non-empty as "true". This is like
Python, but unlike D.
- null can't used used as an alternative for an empty array, 
- standard library supports simple networking:
More docs on the web-page (and most existing ones updates):
Dr Thomas Leonard ROX desktop / Zero Install
GPG: 9242 9807 C985 3C07 44A6 8B9A AE07 8280 59A5 3CC1