The Perfect Language

— features —
multi-dispatch
has interactive shell, can attach and detach with running programs
has modules (and scoping)
anything in a module is valid syntax for the shell
garbage collection
concurrency, (agents?)
dynamic programming
pattern matching
unicode
(possibly quantum algorithm support)
list comprehension, generator comprehensions
built-in serialization
native doc strings
built in marshall/unsmarshall support for distribution (and continuations)

— types —
natively supports bigInts, and cmplx type
has something like enums or atoms, and interation over them (or pattern matching)
has tuples, sets, dicts, lists
typing is dynamic (or non-existant if FP)

— syntax sugars —
end of statement is the newline, indentation is scope (pythonic)

— operators —
** is for pow, and can be used with cmplx or float on both sides
/ always returns float, // returns int, and % returns remainder

— speculation —
what if every object instance was it’s own process
no class-level variables allowed, but implemented as a parent monitor object
and access to all variables was forced sequentially
that is: messages are queued at the function call
then functions would be atomic, but still have local-only side-effects
an object could not be running more than one of it’s functions at a time


Tue Aug 12 17:08:33 PDT 2008

Types

Typing is static and nominal, though RTTI is still supported. Will also have a powerful type-inference system, so that types can be omitted when declaring variables.

Unions

Will allow the programmer to define a type as a union of other types. The fields of the union will be anonymous (not named), and the programmer will refer to the union itself, rather than the parts which make it up. The typing system will infer (statically where possible, otherwise at runtime) what type the union is actually storing. Unions will be packed and byte-aligned. [Internals: they will also contain space for a tag that names the type being stored].

Lists

Will only support homogeneous lists. Will not be supporting C-style arrays, because they are too primitive (want to avoid C++’s answer to Is an array of Derived a kind-of array of Base?). Will support Python-style slicing and indexing operations.

Issues regarding Language Design

  • Processes, Concurrency, Parallelism, Distributed, (Agent?) (QNX)
  • Time semantics (don’t ignore the passage of time), real-time systems (QNX)
  • Logic and Constraint Solving, should be possible to co-opt the type-inference engine into solving problems.
  • Quantum, and Scientific Computing
  • Machine Learning problem should be easy to state. AI, agents
  • OS device drivers need embedded assembly

Update Tue Sep 11 19:23:59 PDT 2012
Stack Storage and Garbage Collection

Leave a Reply

You must be logged in to post a comment.