DPL: Dave Programming Language

High-Level Goals: The runtime will also have some useful goals: Some thoughts I've written:

Unusual features, or unusual implementations of features:

Priority One

classes implicitly declare interfaces which you can use for type-compatible implementation without code-reuse.
Previous work:
 * Sather
Previous discussion:
 * Mark Carroll and Henry Spencer
Encourage general type requirements for functions by warning when types are specified more narrowly than code requires. Consider methods to allow name-based polymorphism like dynamic typed languages.
Previous work:
Previous discussion:
safe/unsafe code regions, with unsafe code having full C style machine and pointer access
Previous work:
 * Modula-3
 * C#
Previous discussion:
Implicit type declaration using simple expression-local type-inference to aid in scripting.
Previous work:
 * ML,Haskell
Previous discussion:
Avoid the "import everything problem", where you have to import three modules to use a class, because you have to import the types of all the return values of methods in the class. Either because of implicit-type declaration, or because of recursive imports.
Previous work:
Previous discussion:
run-time typing or type-inference based scripting (even though the language has static type checking). Including optional run-time atomatic type-conversion and exception on mismatch.
Previous work:
 * BeanShell for Java
 * Ocaml
Categories/category loading: the ability to load sets of methods onto an existing type. For example, being able to load an extension onto the basic String object type which has additional functionality. Similar to COM object aggregation.
Previous work:
 * Objective-C Categories
 * TOM Extensions
Previous discussion:
symbol evaluation within type context. (i.e. knowing that std.open("foo",O_RDONLY) is sufficient instead of requiring std.open("foo",std.O_RDONLY).
Previous work:
Previous discussion:
Accessing public class instance data should always be through property getters/setters. That is, a piece of instance data made public implicitly has getter/setter stubs defined for it which merely get and set the data. This means you can define a new getter/setter for any public instance data at any time and remain binary compatible. In the case of nice VMs/JITs, the small runtime cost can be optimized out in most cases anyhow.
Previous work:
 * C# properties (for get/set syntax)
Previous discussion:
user defined attributes on language structures (for documentation, structure layout, type signatures, debug information, method/variable names, etc)
Previous work:
 * SELF attributes
 * C# attributes
Previous discussion:

Priority Two

Syntax extension for: (a) operators, instead of operator overloading, (b) extendable pre-initialized data-syntax
Previous work:
 * CamlP4 (separation of parse and compile for syntax extension)
 * F<: (fsub) (syntax extension)
 * LISP Macros
 * C/Perl/Python pre-initialized data
in-line structure definition. This allows the power of Python tuples without the mess. (xyz: 1, abc: 2)
Previous work:
Code-as-you-go scripting. Support for an editing environment which lets you break and write code at the breakpoint. Using inspection of live data as an example for your coding.
Previous work:
 * (IDE/VMs with live code reloading)
nested/local functions, with inheriting of paramaters from nested scope. (eventually could be used for run-time code generation)
Previous work:
 * gcc,python,lua upvalues
 * `C (tick-C, C superset with dynamic code generation)
Previous discussion:
default/provided method for compile-time code generation/macro expansion. (ex. IDL generator, rpc stub generator,rpc stub generator, making type-correct row objects for OO<->RDBMS database adaptor)
Previous work:
Previous discussion:
Exception-time interrupt handlers which can fix exception conditions and return to normal execution without causing a stack-unroll..
Previous work:
Previous discussion:
Proxy objects (RPC proxy, odb.py, transparent adaptors, caches, etc)
Previous work:
 * Python __attr__
 * Objective-C forward::
Previous discussion:
Processor independent output format designed for simple static load-time compiling.
Previous work:
 * TaOS
 * JVM, MSIL, Juice
Previous discussion:
Partial application/curried functions/bound functions. The method by which you can bind values to some arguments of a function, leaving the rest to be provided on the application of the new partially bound (or partially applied) function.
Previous work:
 * ML
 * Python bound methods
Previous discussion:

Common but pivotal features to include:
Non-Pausing Automatic Memory Management. (supporting weak references, pinned down buffers, cyclic data-structures, boxing of value types, handles to references)
Previous work:
 * Baker Incremental Collection/concurrent collection/Treadmill collection
 * Reference Counting + cycle-finding (Python, 'reverse GC')
Previous discussion:
lambda/anonymous functions/blocks with arguments
Previous work:
 * Scheme
 * Python,Lua,Smalltalk
Previous discussion:
safe variable argument handling
Previous work:
 * Python,C#
Previous discussion:
dynamic function application/argument list construction
Previous work:
 * Smalltalk,Python
Previous discussion:
automatic serialization of arbitrary user-defined datatypes using reflection/introspection. (i.e. like Python marshal of classes, not like C++ style manually writing serialization methods)
Previous work:
 * dynamic: Smalltalk, Python
 * static: Eiffel
Previous discussion:
syntax for interface based iteration. (i.e. user-defined datatypes can participate via interface)
Previous work:
 * Python (for x in y:)
Previous discussion:

Other common features to include:
Aggregate/defined datatypes: strings, structs, sets, enums, unions
Previous work:
Previous discussion:
Fully unified object system (ALL types are objects).
Previous work:
Previous discussion:
All datatypes, functions, and bound methods are first-class. That is, they can be used and passed anywhere.
Previous work:
Previous discussion:
Paramaterized typing.
Previous work:
 * Modula-*
 * ML
 * C++ templates
Previous discussion:
Static type-checking based on type-signatures of: structures, enums, interfaces, sets.
Previous work:
Previous discussion:
Module system with nicely nested namespaces.
Previous work:
 * Python (although it dosn't nicely nest)
 * Java,C# (but avoiding the import chain-reaction)
Previous discussion:
Type description of compiled components, structure layouts, etc. within compiled library packages for any public interfaces.
Previous work:
 * Java
 * Microsoft .NET Assemblies
Previous discussion:
Reflection and dynamic method dispatch based on type-library information for public type signature elements.
Previous work:
 * Java
 * Microsoft .NET Assemblies
Previous discussion:
named optional arguments, multiple return values
Previous work:
 * Python
 * Lua, TOM
Previous discussion:
automatic foreign function (C/syscall) argument marshal/unmarshal without stubs
Previous work:
 * VB
 * C#
Previous discussion:
Exceptions, with standard stack-unroll try/except
Previous work:
Previous discussion:
Recursive functions.
Previous work:
Previous discussion:
Debugging extension capabilities.. for example, when debugging a GUI, it would be nice to be able to add the stack backtrace of where the components were instantiated to the "name" of the component, or some other thing accessable in the debugger.
Previous work:
Previous discussion:
Optional Checked Exceptions. Java has pretty much proven that requiring checked exceptions is both helpful and hurtful. I propose a scheme where exceptions thrown MUST be declared for public methods. This prevents the most common problem with checked exceptions in Java, namely that you are forced to add extra code either to (a) catch exceptions or (b) declare that you throw them. The compiler will be able to infer the exceptions which are possibly thrown from all private or protected methods, and it can read the specification of any public methods in other assemblies. This will give us the "predictability" that Java's checked exceptions provide, without the needless work.
Previous work:
Previous discussion:


David W. Jeske (jeske@chat.net)