Alore development

JukkaL edited this page Oct 21, 2011 · 9 revisions

This page covers topics related to Alore development.

Make Alore more like Python

Plan for making Alore resemble Python: Alore Python Unification


New language features

The following language features have high priority:

  • Optional strict runtime type checking when using mixed typing
    • Check type errors when a dynamically-typed value is bound to statically-typed variable
  • final classes
    • To get rid of the special status of primitive types such as Int and Str
  • Bounded polymorphism
  • Source file level option for requiring full type annotations
    • Give a warning/error if implicit dynamic types are used in a file
    • Otherwise it's easy to forget some dynamically-code lying around

These convenience features are under consideration:

  • Indentation-based syntax (allow omitting end)
    • More Python-like, more compact, quicker to write
  • Short-hand one-line notation for statements and definitions
    • Colon may be used for single-line body without proper block, e.g.
      • for x in a:
      • if cond: break
    • Maybe also short-hand closure syntax: def x: x + 1 instead of def (x); return x + 1; end
      • Similar to Python lambda
  • Collection map/filter
    • Maybe array comprehensions, similar to Python?
    • E.g. [s.strip() for s in a], [x for x in a if x != nil]
    • With short-hand closure syntax filter/map-style higher-order functions also become more practical
  • No need to declare top-level variables
    • More convenient for interactive use
    • More convenient for short scripts
    • Implicitly declared variables should be module-private
  • Use syntax { key : value, ... } to construct maps
  • Multiline string literals (e.g. triple-quoted string literals)
  • Hexadecimal integer literals
    • Are they necessary? These might be useful for interoperability. Int('ff', 16) already works, though.

Other useful features:

  • Redefining member access logic (similar to Python's __getattr__)
    • This needs to work well with the type system
  • Better syntax for freeing/closing resources (files, mutex locks, transactions)
    • Maybe something like the Python with statement?
    • Or ruby/smalltalk style blocks?
  • Selective import from module import a, b, ...
    • Improves maintainability and reduces the chances of name clashes

New library features and modules

These module are currently being worked on (but perhaps slowly):

  • Command line argument parsing module (argparse)
  • File utilities such as Glob, RemoveTree etc. (fileutil)
  • Creating temporary files and directories
  • Communicating with subprocesses (similar to Python subprocess module)
  • Object serialization
  • Cryptographic hashes such as sha1
  • Better module for dynamic loading of code
  • Postgresql access
  • HTTP server
  • Unicode database

These are also important:

  • Xml parsing
  • Template library / web development framework
  • Gui library
  • Sqlite / mysql etc. access
  • Locale support
  • Sending emails
  • Ssl
  • Asian character encodings
  • Windows registry access
  • etc.

New tool features

The following have high priority:

  • Native code compiler
  • Interactive interpreter
  • Alore-Python bridge that allows using Python modules from Alore code

These are also important:

  • Debugger
  • IDE support with code completion etc.
  • Profiler

These would be nice eventually:

  • Alore-to-JavaScript compiler (or even Alore-to-Dart compiler if Dart takes off)
    • Compiler should be fairly easy, but library support might be more tricky
  • Alore JVM implementation
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.