AitCS and DruMa

An AitCS is sugar for arrays with "operators" in the form of
aliases that provide additional functionality.
One operator is "+" which is equivalent to the lappend command.

Array

% array set app {}
% set app(status) ok   
ok
% string totitle $app(status)
Ok
% set app(numbers) {}
% lappend app(numbers) 1 2 3 4
1 2 3 4
% llength $app(numbers)
4

AitCS

% aitcs new app ;# Returns the fq name of the array.
::__app__<random chars>_
% app status ok
ok
% string totitle [app status]
Ok
% app numbers {}
% app+ numbers 1 2 3 4
1 2 3 4
% llength [app numbers]
4

A DruMa is an object that is "attached" to an AitCS and is used the same way,
but there is now an additional operator ":" that provides access to the object.
It is recommended to subclass the DruMa_Basic class as the DruMa class is very new and in flux.

This is the simplest subclass, with one additional method.

oo::class create MyDruMa {
    superclass ::druma::DruMa_Basic
    # Superclass vars
    variable name  ;# aitcs name
    variable aitcs ;# to access the aitcs itself
  
    method info {p} {
        return [format {%s: %s%s} $name [$aitcs status] $p]
    }  
}

Usage is same as AitCS but with bonus ":" operator.

% MyDruMa new app
::oo::Obj15
% app status ok
ok
% string totitle [app status]
Ok
% app: info !
app: ok!