Lang note: the ability to do a "recognize as" from atomic items to some structure with a minimum of fuss (and certainly without having to perform an explicit construction step) is essential to using structured design everywhere it will be useful.
For example: if a certain piece of functionality is best expressed as the function:
bool isAuth(int requestorType, string requestorName, int resourceType, int resourceName, int permLevel);
...but elsewhere there are the fully articulated structures (or objects!): struct Requestor { int type; string name; ... }; struct Resource { int type; string name; ... }; struct Permission { int level; ... }; struct Request { Requestor req; Resource res; Permission perms; };
...then it absolutely pays to be able to go back and forth transparently, both in the code and at runtime. E.g.?
11:14:48 AM
|