dao
dao copied to clipboard
Dao Programming Language
I have long considered to move `macro` to the standard module repository (dao-modules). I am also considering to move `help` there as well. The will effectively leave just three modules...
``` enum MyEnum { A; B; C; } var AB = MyEnum.A + MyEnum.B; var BC = MyEnum.B + MyEnum.C; var intersection = AB & BC; ``` This works correctly...
ns1.dao: ``` namespace ns { DoSomething }; routine DoSomething() { io.writeln("Something"); } ``` ns2.dao: ``` namespace ns { DoSomethingElse }; routine DoSomethingElse() { io.writeln("Something Else"); } ``` Interactive console: ```...
This is not an xml bug, it's just easily reproduced using the xml module. ``` load xml var doc = xml.parse( @[] @[]); var root = doc.root; var childrenElem =...
When catching exceptions, you may sometimes need to re-raise them. For instance, when you determine that this exceptions cannot actually be handled at this point. Or when exception handler is...
I know I already brought this up long ago, but I think the idea may need to be re-evaluated. Currently Dao uses old-school switch-case-default syntax for `switch`. I wonder if...
Suppose I have files `logic/windows.dao` and `logic/unix.dao`, one which I want to import depending on the current OS. But I don't want to use `std.load()`, as I loose all the...
Playing around seeing if I could figure out whether or not Dao has destructors, I made a class that looks like this: ``` class MyClass { routine MyClass() { io.writeln("Construct");...
Forward declaring classes works fine if they're in the global namespace. However, I can't figure out a way to forward declare classes that are in a namespace. For example: _A.dao_...
OpenBSD adopted a [solution to overflows](http://lteo.net/blog/2014/10/28/reallocarray-in-openbsd-integer-overflow-detection-for-free/) when allocating memory. They created wrapper: ``` c void *reallocarray(void *optr, size_t nmemb, size_t size) { /* most of the times, the numbers are...