[Delight-general] Delight 0.3
Status: Alpha
Brought to you by:
tal197
|
From: Thomas L. <ta...@gm...> - 2008-10-26 15:26:24
|
Delight 0.3 is now out: http://delight.sourceforge.net/ The main changes are that it now uses dynamic libraries and supports GObject linkage (mainly for GTK): http://delight.sourceforge.net/gtk.html Changes to the compiler: Assignments in if statements only worked for class/pointer types It tried to turn everything into a maybe type, even ints, etc. Scan dynamic libraries for GC roots Code was disabled, and didn't compile. Also, it didn't work on 64-bit. Don't require a ; after a continue statement Add GObject linkage type Works like C, except that we don't mangle interface methods either. e.g. For example, this: extern(GObject): interface GtkWidget: void show() GObject obj obj.show() becomes gtk_widget_show(obj) Name is lower-cased, and an _ inserted before each upper case letter that follows a lower case one. Might need to way to state the stem explicitly for some types. Added linkage to ClassDeclaration Don't allow implicit cast to Object unless the source interface has D linkage. Static, renamed, and selective imports were public Applied patch from D Issue 314. Fixed some parsing errors for enums Note: "enum Foo extends string: ..." now parses, but the compiler crashes later. Fixed line number in error about global variables Be stricter about function return types If a function is declared as returning "void", don't allow return with an expression. Main.main must have a return type of void. Modular handling of externals Instead of having the main module import the single dlt._externals file, it now imports files based on the type. For example, if you do: import dlt.io: Printer class Main: in Printer stdout Then it calls '_externals.dlt.io.stdout()' to get the object. This avoids creating dependencies on modules and symbols we don't need, and makes it easier to extend the library with new externals. A related change is that SystemExit is now part of object.d and handled by the normal D main invoker. This was being handled by a method on the old Externals object. Allow maybe annotations even for D code Makes it easier to adapt D interfaces for Delight. Only include core functions in libgphobo2.so. Only etc, gcc, internal are now included in the build, not std. This is because the .so file is needed at runtime, so you need to be able to get it without downloading the whole compiler. Therefore, it should come with the (much smaller) Delight standard library. So the plan is: - libgphobo2.so contains only things that must be built with the compiler. - libdlt contains the rest. - libdlt is bundled with a copy of libgphobo2.so. There are therefore two copies of libgphobo2.so, which is why it needs to be as small as possible. Build libphobos.so shared library, not static libphobos.a See Gregor Richards' post: http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=43627 Also: http://www.dsource.org/projects/tango/ticket/875 "cast(Foo) foo" gets a maybe type only if Foo is a class For pointers, no check is made whether the type is correct, so the result never becomes null. Static imports by default import dlt.io # static import import dlt.io: Printer # symbol import import dlt.io: * # D-style import all Suggested by Leonardo and others. Don't require a ";" after a mixin "catch (Exception ex):" becomes "catch Exception ex:" Fixed printing of log statements (in error messages, etc) Changes to the library: Added GTK support GTK code goes in libdltgtk.so to avoid unnecessary dependencies if you don't want it. The main dlt.gtk interface is generated using the scripts in the gen directory (but not automatically, since it requires pygtk). Example: import dlt.gtk: * class Main: in Gtk gtk void main(string[] args): args = gtk.init_check(args) auto w = gtk.gtkWindow() w.set_title("Hello from Delight!") w.show() gtk.main() Implemented fs.resolveRelativePath and fs.parent Added stdin external Removed string functions from core. D gets confused when a module with unit-tests is compiled with them off but imported into code with them on. dlt.core should not need module info. Also brought back the math functions, and added some imports required by the new stricter private imports. Split out filesystem bits of dlt.io to dlt.fs Split _externals into modules in their own package Build libdlt as a shared library and bundle a copy of libgphobos2.so This is so that binaries don't need to depend on the compiler package. To reduce duplication (since the compiler and the library both contain libgphobos2.so now), most of the code has been moved from libgphobos2 into libdlt.so. format() now returns a string, not a char[] Implemented reuse server socket parameter -- Dr Thomas Leonard ROX desktop / Zero Install GPG: 9242 9807 C985 3C07 44A6 8B9A AE07 8280 59A5 3CC1 |