Experimentation Stage

Status

Lense is currently in the Experimentation Stage. The language features are being defined and experimentation is underway to understand how they interact together.

At this point is it already possible to compile to java backend and run a program. Many features are already supported, but some are still being explored.

Roadmap

In a given stage we focus on reaching the stage goals. This does not mean no work is done in other stages but this work is done to explore some decision consequences or ascertain future difficulties and can change once we move to that stage.

Envision Stage

Decide on the core concepts, the supporting syntax and related keywords. At this stage the work is mainly about definition of a BNF grammar and the parser rules. These rules need to be validated and being able to obtain the Abstract Syntax Tree (AST) for the language.

Define primary design rules like the double-symbol operator o mean the operator is not comuutable.

Exploration Stage

Work for this stage focus on how to assure the core feature can be available and viable in a multi-platform scenario. At this stage some work is made on the infrastructure necessary to transform the AST to other intermediary representations and finally to bytecodes. The interaction with native code and libraries is also studied at this stage. A way to create and resolve modules - and type in modules - is also explored. Finally a base for an IO API is provided

Experimentation Stage

Be able to compile and run an output only Console Application in a target platform. The Java Virtual Machine is the first candidate but several others are possible. At this stage some work is made to validate the feature does run on the target platform.

Module resolution and type resolution in modules is also validated at this stage.

Embrace Stage

Produce several auxiliar modules to the core module. Differentiate modules by platform and consider separated assemblers for each target platform

Expand Stage

Compile to other platforms like Javascript, TypeScript or Dart. Produce modules specific to those platforms or that are available only in some platforms.

Evolve Stage

Discover new opportunities for better integration with platforms, better plataform independence and better performance.

Features Status

Feature

Description

Status

Strong Static Typing with Inference

all objects have a type at compile time, and the compiler can infer most types

Embrace

Flow Sensitive Typing

casts are not necessary when the compiler knows a variable is already of a given type

Embrace

Numeric Tower

support for Natural, Integer , Rational, Imaginary and Complex numbers

Embrace

Power Operator

support for a power operator (^^)

Embrace

Enhancements

you can use Enhancements to add methods to types you don’t control.

Embrace

Method Overriding

allow the derived class to re-implement a method from the base classes

Embrace

Method Overloading

allow the same method name with different signature

Embrace

No nulls

do not allow variables and fields to be null. use maybe monad

Experimentation (not clear if needs maybe erasure)

Modules

the compiler produces modules with dependency and version information on other modules.

Experimentation ( resolve multiples modules )

Single Inheritance

Single Inheritance for classes , multiple inheritance for interface

Experimentation (need traits)

Sealed Type Hierarchies

you can limit the instances of a type and/or the types that inherit from it

Experimentation (needed to define enums)

Immutability first

You have to opt out of immutability explicitly using mutable

Embrace

Juxtaposition

support for simple juxtaposition that enables units like 2 kg

Experimentation (explore other uses besides units)

Native code and Peers

support implementation delegation to the native platform

Experimentation (not clear interaction with native modules)

Reification

support availability of generic type parameter information at runtime

Experimentation (not clear interaction with 'is' operator)

Reflection

allow code to inspect modules,classes and members

Exploration (not clear from where/how to load information)

Native inter-op

call native code directly from lense code without delegation

Envision (not clear interaction with native modules)

Type classes

Types classes are for classes what classes are for instances. Also known as shapes

Experimentation (base for operators, new use cases)

Operator Overloading

Operators are related to type classes and follow mathematical concepts

Exploration (needed to apply type class concept)

Monads

support for monads and monadic operations.

Exploration (needed to apply type class concept)

Lambdas

function objects made easy

Envision (not clear is should use lambda or closure)

Platform Status

Platform

Status

Java (JVM)

Compiles and runs

JavaScript/TypeScript

Under development

Dart

Under consideration

.NET (CLR)

Under consideration