Reuse, not rework
Home

License Awareness



Highly Reusable Software

By activity
Professions, Sciences, Humanities, Business, ...

User Interface
Text-based, GUI, Audio, Video, Keyboards, Mouse, Images,...

Text Strings
Conversions, tests, processing, manipulation,...

Math
Integer, Floating point, Matrix, Statistics, Boolean, ...

Processing
Algorithms, Memory, Process control, Debugging, ...

Stored Data
Data storage, Integrity, Encryption, Compression, ...

Communications
Networks, protocols, Interprocess, Remote, Client Server, ...

Hard World
Timing, Calendar and Clock, Audio, Video, Printer, Controls...

File System
Management, Filtering, File & Directory access, Viewers, ...


C++ implementation choicesSome librock features are supplied for use in C++. The following choices were made.

librock does not override operators in C++
Rationale: Even though overloading operators often saves keystrokes, it often violates the principle of least surprise and hinders understanding the software written by others.

There is nothing that can't be done with named functions, and when the trade-off is keystrokes vs. understanding, we go with understanding.

librock does not use templates in C++
Rationale: For wide acceptance, it is important to supply code easy to understand and modify. Creating and debugging templates is quite difficult. Beyond the few fundamental collection classes, there aren't many strong appropriate uses for templates. Finally, if you aren't overloading operators (and we aren't) then templates aren't much better than a base or class.

librock does not throw (or catch) exceptions in C++
We do something more flexible. So that librock can be used in projects which do and which do not catch exceptions, we don't throw them. We don't have anything against you using exceptions, but our wide-reuse philosophy is that librock functions must assume as little as possible about the caller and context of use. All errors and conditions are "anticipated" and handled in the "normal" flow of control. Otherwise, librock functions indicate exceptional conditions with an error return value (which is often an explanation string, not a #defined constant.)

We understand that sometimes librock will be used in projects that DO want to catch exceptions. Some librock functions call out to an error handling class of virtual function (which you supply), and that can throw exceptions based on the particular condition. The caller can always provide a wrapper function to detect and throw the exception.

DEBUG: class wrapping