load help;


@[name]
dao.feature
@[name]

@[title]
Dao Feature Summary
@[title]

@[author]
Limin Fu
@[author]

@[license]
GNU Free Documentation License
@[license]

@[text]


Key features:
@[list]
--@[green]Optional typing with type inference and static type checking:@[green]

  Optional typing allows variables to be declared with or without
  explicit types. Types will be inferred and checked whenever
  necessary and possible to allow early detection of bugs.
  Also explicit and inferred type information could be used
  do code and function specialization to make programs more efficient.

--@[green]Just-In-Time (JIT) compiling:@[green]

  A standard module based on the Low Level Virtual Machine (LLVM)
  compiler infrastructure is provided to support JIT compiling.
  Currently this JIT compiler module is mainly developed for supporting
  numeric compuations.

--@[green]Built-in support for concurrent programming:@[green]

  Concurrent programming is made simple by a number of concurrent
  code section methods and asynchronous classes.
  The basic concurrent computational unit is a tasklet which consists
  of a virtual machine process (context) and a future value (handle).
  A tasklet is mapped to a native thread only when it becomes active.
  Tasklets can communicate and synchronize with each other by channels.
  Concurrent garbage collection is supported by the virtual machine
  to make concurrent program safe.

--@[green]Transparent C programming interfaces:@[green]

  The C programming interfaces of the virtual machine are specifically
  designed for easy embedding and extending. With the support of explicit
  type specification in function parameter list, boilerplate codes for
  checking and converting parameter values from Dao data types to C/C++
  data types can be easily avoided.
  This means writing Dao wrapper functions is significantly simpler than
  writing wrapper functions for other languages without explict typing
  in parameter list.

--@[green]ClangDao for automatic wrapping of C/C++ libraries:@[green]

  ClangDao uses the C/C++ frontend of Clang to parse C/C++ header files
  and generates proper wrapping codes for Dao. It has been used successfully
  to generate a number of bindings for Dao.
@[list]

Other interesting features:
@[list]
--@[green]Syntax macro:@[green]

  Dao supports user-defined syntax by syntax macros, which can be expressed
  in a form similar to Backus-Naur Form (BNF). Dao allows syntax macros to be
  attached with "language" names, and provides a mechanism to avoid unexpected
  interference with the standard syntax.

--@[green]Object-Oriented Programming (OOP):@[green]

  Object-Oriented Programming support in Dao is class based. Dao classes are
  similar to C++ classes in several ways with a few new features.

--@[green]Abstract interface:@[green]

  An abstract interface is type that defines a set of abstract methods for
  static type checking. A combination of interfaces and classes could support
  more flexible software design by both compositions and inheritances.

--@[green]Deferred block and exception handling by defer-recover:@[green]

  Deferred block is a code block whose execution is deferred to the time
  when the function exits. Defer-recover is a mechanism to handle exceptions
  in deferred blocks.

--@[green]Code section methods:@[green]

  Code section/block method is an alternative to functional methods in other
  languages such as Python. It is syntactically similar to Ruby Code Block.

--@[green]Typed function decorator:@[green]

  Function decorators are functions that modify the behavior of other functions.
  Dao function decorators support static type checking.

--@[green]Anonymous function:@[green]

  Anonymous functions and closures can be created anywhere in a program.
  Their definition is very similar to the normal functions.

--@[green]Mixin class, class decorator and aspect class:@[green]

  Mixin class supports composing new classes without inheritance.
  Class decorator supports compiling time modification of classes,
  and support Aspect-Orient Programming through automatic application
  of class decorators.

--@[green]Enum/flag/symbol type:@[green]

  The enum type in Dao is more or less a combination C++ enum and Ruby symbol.
  It has the advantage of both, and can be used in situations where C++ enum
  or Ruby symbol are typically used.

--@[green]Variant or disjoint union type:@[green]

  Variant type is a combination of two or more types. A variant variable
  can hold a value of any of the combined types.

--@[green]Coroutine and generator:@[green]

  Module support for coroutine makes collaborative multithreading simple,
  and allows static type checking across the yielding and resuming boundary.

--@[green]Auxiliary methods:@[green]

  Any type can be attached with auxiliary methods that do not actually belong
  to the type, but can be invoked as its member methods.
@[comment]
  --@[green]Customized for-in iteration;@[green]
@[comment]
--@[green]Built-in multi-dimensional numeric array;@[green]
--@[green]Built-in support for string pattern matching;@[green]
--@[green]Built-in hash map type;@[green]
--@[green]Template-like C data type;@[green]
--@[green]Standard help system;@[green]
--@[green]Data serialization;@[green]
--@[green]Mixed programming with embedded C/C++ codes;@[green]
@[list]

@[text]




@[name]
dao.changelog
@[name]

@[title]
Dao Change Logs
@[title]

@[text]


@[subsection]2013-11-26@[subsection]

@[list]
--@[red]CHANGED:@[red] 
  Implementation of @[code]frame(){}@[code] from syntax construct to built-in method;

--@[red]REMOVED:@[red] Support for the assertion @[code]??@[code] operator,
  use @[code]frame(){}@[code] instead.
@[list]


@[subsection]2013-11-23@[subsection]

@[list]
--@[red]CHANGED:@[red] 
  Syntax for calling code section methods and syntax for data packing
  (function partial application, uniform initialization etc.) are @[red]swapped@[red].
  Namely, there is no need for @[code]::@[code] before @[code]{@[code] for code sections,
  and it is required for data packing. For example,
@[code]
type MyTuple = tuple<int,string>
tup = MyTuple::{ 123, 'abc' }
fut = mt::start { rand() } # no ::
@[code]

--@[red]CHANGED:@[red] 
  Syntax for decorator declaration is improved to avoid implicit declaration of the
  variable for function parameters.
  Previously the variable @[code]__args__@[code] is automatically declared,
  now users can declare it to be any name by placing it in a pair of brackets
  right after the parameter name of the first parameter.
@[code]
routine @Decorator( func(args) : routine )
{
	io.writeln( 'Calling function:', std.about(func) );
	return func( args, ... ); # ... for parameter expanding;
}
@[code]

--@[red]REMOVED:@[red] Support for the @[code]:=@[code] operator.

@[list]

@[text]



#Last but not least, Dao virtual machine is programmed in standard C,
#and released under the Simplified BSD License.


#{

@[name]
dao.feature.optyping
@[name]

@[title]
Optional Typing
@[title]





@[name]
dao.feature.concurrent
@[name]

@[title]
Concurrent Programming
@[title]

#}
