-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Whether we like it or not, we’re occasionally forced to use the wrong tool for the job. For instance, if we’re developing automated tests using QTP, then our hands are tied: VBScript is the only language supported by the tool. Likewise, we might find that a company’s corporate policy prevents us from installing a scripting language on a client’s machine, so we’re forced to use either VBScript or JScript. Or, we could just opt out entirely and create an unmaintainable CMD script. Life is hard.
Fortunately, Tolerable can make these experiences less traumatizing. Tolerable super-charges the VBScript language and adds support for Functional and Object-Oriented programming paradigms. Thus, many simple tasks that formerly would have required hundred of lines of procedural code can now be reduced to a handful of statements. Life is good.
This is the preliminary list of features. Most of the upcoming features should be ready by the end of the week.
- Function Library Management VBScripts can now easily import other VBScript libraries without all of the FileSystemObject messiness. Additionally, the LibraryManager class keeps track of which libraries have already been loaded, so you will not experience any side-effects caused by executing a library twice.
- Basic Data Structures : The core engine defines LinkedLists, DynamicArrays, Iterators, and Enumerators. More data structures will appear once the Tolerable core has been completed.
- Anonymous Functions and Closures : VBScript’s eval(…) statement can be handy in a pinch, but it really has limited usefulness. Tolerable provides true support for Anonymous Functions and Closures, which allows functions to be generated on the fly and passed around the code. Hence, the Strategy Pattern becomes a viable design choice.
- Lazily-Evaluated Enumerators : Enumerators have an arsenal of powerful methods, such as .Map(…), .Retain(…), .StartWhen(…), and others. Even better, these methods are all lazily-evaluated, so values are only computed when it is absolutely necessary.
- Memoizer Support : Any function can instantly be transformed into a memoized function by wrapping it with a Memoizer object. Hence, you no longer need to worry about implementing caching logic just to avoid unnecessary calls to a computationally-expensive function.
- Dispatcher Support : Dispatcher functions delegate execution to other functions depending upon the input arguments. More importantly, this behavior can be modified after the Dispatcher has been defined. This allows developers to implement and extend polymorphic functions.
- Object Inheritance
- Open Objects and Classes
- Support for Meta-Programming