lms

Light-Weight Modular staging library for D langauge.

Popularization of dependency injection framework somehow shaded the bigger and more general technique - staging and staged computation.

This library ractifies that omission for the D language.

More...

Members

Classes

BasicStage
class BasicStage

Simple stage that keeps slots as key-value pairs in built-in AA.

Constant
class Constant(T)

Simpliest of all - just a constant, stays the same, regardless of _stage_

Lift
class Lift(T)
Slot
class Slot(T)

Slot - a placeholder for value, that will be provided at a later _stage_

Functions

lift
Lift!T lift(T value)
Lift!T lift(Lift!T lifted)

Lift a simple constant

Interfaces

Stage
interface Stage

Stage is equivalent to DI container (or rather DI is simple late-binding + basic form of staging) but the composition and execution of them is independent and encapsulated by Lift!T interface

Detailed Description

Built with love based on the ideas in the paper:

Lightweight Modular Staging: A Pragmatic Approach to Runtime Code Generation and Compiled DSLs by Tiark Rompf and Martin Odersky.

The above paper and many other good ones by Scala team at EPFL are here https://scala-lang.org/old/node/143.

Meta