Nesting Hierachy

Matthew Tuck matty@box.net.au
Wed, 18 Nov 1998 22:31:15 +1030


I sent a message out before about the inheritance hierachy, and now I'd
like to ask about the nesting hierachy.  That is, what is known as
packages, modules or nested classes in other languages.  Here's a
proposal.

This is the sort of library I'd like to see.  I don't know if it's
obvious, but I've try to embed flexibility.  You also see sort general
facilities that use other general facilities.  For example the run-time
compiler might use the state automaton facilities.  And the relation
library could be used for interesting things, like being extended to
having a subclass relation between classes.  In fact, the relation class
I think will shape a lot of my future ideas, but that's a story for
later.

There's a lot missing.  Expect big changes in the space below, both in
additions and simplifications:


Standard
	Object - The base class.
	PartialOrder - Gives a partial ordering of objects.
	TotalOrder extends PartialOrder - Gives a total ordering of objects.
	Stream - A one at a time stream, possibly with pushback, random access,
etc.  Used in "For" stmt.
	Range - A range of values.
	Binary - Any two valued type.  Has a Not operation, But No
And/Or/Xor/Implies.
	Boolean extends Binary - True/False.  Used in "If", "While", "Repeat"
Stmts
	Observer - A facility for observers wait for events.
	Throwable - An object that can be thrown as an exception.
	Exception - Subclasses of this must be listed in exception lists.
	Ordered - An object with a standard TotalOrder.
	Hasher - Converts an object to a number.
	Formatter - Converts an object to a string.
	... Standard Exceptions (NullPointer, RuntimeTypeConversionFailed, ...)
...

Mathematical
	Number - Any numeric value.
	ExactNumber extends Number
	ApproxNumber extends Number
	IEEENumber extends ApproxNumber
	... Trigonometric/Hyperbolic/Exponential Operations ...
	... Statistical Operations ...
	... Engineering Operations ...
	... Finance/Accounting Operations ...
	... Vectors, Matrics, Tensors ...
	... Complex Numbers ...
	... Unlimited Precision Numbers ...
	... Support For Converting To BitPatterns And Back ...
	... Fundamental Mathematical Constants ...
	... Curve Fitting ...
	... Differential/Integral Calculus ...

Collections
	Set
	Sequence
	Bags
	UniqSequence
	... Stacks, Queues, Deques, Falloff Queues/Dequeues, Priority Queues
		(probably don't belong here) ...
	... Need to set up an inheritance hierachy concerning order and
multiplicity ...
	... Many higher order routines go here (scan, map, filter, ...) ...
	... Many common string ops work on any sort of collection
		(substring, tokenising, concatenation, reverse ...) ...
	... Sorting (implementations such as QuickSort, MergeSort, BucketSort,
HeapSort,
		...) ...
	... Searching ...
	... Longest Common Subsequence, Rotate, etc. ...
	... Random Subset Of Size n ...
	... Pattern Matching ...
	... Permutations & Combinations ...

User Interface
	... GUI Facilities ...
	... CUI Facilities ...
	... Standard Streams (StdErr, StdOut, StdIn) ...
	... Standard Superclasses of graphic, sound, movie handlers ...
	... Possibly viewers/players for some standard formats of above (PNG,
JPEG, ...) ...

Utility
	TrueRandom - Takes no seed.  (usually implemented by implicit seeding
of time?)
	PseudoRandom - Takes a seed.
	... CRC16/32/Checksum ...
	... Check Digits ...
	... Compression/Archiving (Standard Interface To Different Methods) ...
	... Encryption ...
	... As many higher order routines as needed (some go elsewhere, e.g.
collections) ...

File System
	... Drives ...
	... Directories ...
	... Files ...
	... Persistence ...

Textual
	Character (Unicode of course)
	String renames Sequence<Character>
	... Special String Operations ...

Internet
	... Sockets ...
	... HTTP/FTP/URL/HTML/XML ...
	... E-Mail ...
	... MIME/UUEncode/XXEncode ...

Threading(?)

Time/Date
	... Standard Formatters ...
	... Various Operations ...

Low Level
        BitPattern renames Sequence<Boolean>
        Byte renames BitPattern<8>
        ByteSequence renames Sequence<Byte>
        BitStream renames Stream<Boolean>
        ByteStream renames Stream<Byte>
        
Reflection
	... Classes ...
	... Methods ...
	... Stack Traces ...

Run-Time Classes
	... Compiler (Scanner, Parser, Checker, Optimiser, Generator)
		These are easy to provide if we bootstrap the compiler ...
	... Run-Time Class Loading ...
	... Run-Time Class Optimisation ...
	... Sandboxing ...
	... Support for taking other external languages and compiling into
Ultra
		(e.g. string files for internationalisation) ... 

Relations
	... Graphs (symmetric, transitive, reflexive, directed, edge labels,
node labels) ...
	... Graph algorithms (transitive closure, transitive reduction,
shortest path, travelling
		salesman, graph colouring, minimal spanning trees, steiner(?) trees,
		graph searching, cycle detection, topological sorting, reachability,
		critical path ...) ...
	... State automata ...
	... Relations ...
	... Trees (special sort of relation) ...
	... Tries ...
	... Heaps (special sort of binary tree ) ...
	... Dictionaries (special sort of relation) (implementations include
sorted array, binary
		search tree, hashtable, AVL tree, ...) ...

Internationalisation
	... Standard Local Formatters ...
	... Local Language, Time Zone, etc. ...

Database
	... Interfacing with databases, SQL, ODBC, etc. ...

Logic
	... Support logic style of programming ...

Compatibility
	... Bridges to current libraries for compatibility reasons to old
versions of Ultra ...

-- 
     Matthew Tuck - Software Developer & All-Round Nice Guy
                              ***
       Check out the Ultra programming language project!
              http://www.box.net.au/~matty/ultra/