2013-03-09

adda`lib folder system

1.15: mis.adda/cstr/pkg/how do packages work?/
adda`lib folder system:
. I seemed to have missed the point of
de-anonymizing a type:
12.8.16: 12.11.10:
recordvar.( x.recordtype, f().t );
========================
adda`lib/recordvar.__recordvar'rec;
-- text file with this string:
" .( x.recordtype, f().t ) "
adda`lib/recordvar.body/x/
-- folder contains x's component's values;
adda`lib/recordvar/x.body/
-- for every subrecord a body folder;
adda`lib/recordvar/f().t
-- file contains f's metadata;
adda`lib/recordvar.body/f().t
-- file containing f's body;
-- components of a record's body do the same thing as
components of ada's package bodies .
-- within the adda`lib or any folder listed in adda`path,
the default type of a folder is record .

recordtype.type: ( x.t, y.t );
===================
adda`lib/recordtype.type/
-- . a folder named *.type is defining a record type;
(if the thing named *.type was a file instead of a folder,
then it would be defining an interface type ).
adda`lib/recordtype.type/x.t
-- a text file containing x.t's specification
adda`lib/recordtype.type/y.t

recordtype`body: ( x.t: ..., y.t: .... );
=========================
adda`lib/recordtype.body/x.t
-- a text file containing x.t's implementation
adda`lib/recordtype.body/y.t
the point is:
after we give it a system-generated name,
it becomes a named .type,
we do not need to fully show
how to represent an anonymous type;
our example needs only show:
1: how to generate the named type;
2: how to represent a named type .

mis: forgetting the subfile principle:
. folders are for convenience as well as for
allowing changes in component sizing .
. that means any place that expects a file
should also expect folder;
ie, a book can either be one pdf,
or it can be a folder of pdf's
-- one pdf for each chapter, etc .
. so,
the dot-name of the file or folder
is how we know whether it's a tuple or not;
and, the following is no longer true:
"( if a folder is named *.type,
  it is defining a tuple type;
  (if a non-folder file is named *.type
  then it is holding a type definition ).) .
. a subfile named x.type is declaring x;
so then the subfile named x.body
is declaring the body of an interface or tuple .
. "body" can be thought of as a type identifier;
because, it uniquely describes
how to handle its contents:
. given the symbol x.body,
we know there is an x.type elsewhere .

. the term "record" should be reserved for
"record's" english meaning:
a record is any recorded fact .
. a combination of several values
is generically called an aggregate;
if the values have the same type,
the aggregate is called an array;
otherwise, it's called a tuple .

tuplevar.( x.tupletype, f().t );
========================
adda`lib/__tuplevar'tuple.type
adda`lib/tuplevar.__tuplevar'tuple;

tupletype.type: .( x.recordtype, f().t );
===================
adda`lib/tupletype.type

No comments:

Post a Comment