Last update January 25, 2008

Venus Library /

This is a minimal documentation for the VenusLibrary.

I typically don't describe single functions or methods but only words that constitute the semantics of the interface. The idea of LOP (language oriented programming) is to make the interfaces speak for themselves. That means e. g. that all parameters should be mentioned in the function name in the order they occur and all actions should be described.

I use isomorphic OOP and PP calls, that means an Object

   Object o;
might be used by an object oriented
or a procedural
which are considered equivalent (in fact they are technically equivalent because of the implicit this pointer that is passed with the method call).

Typically the Venus library will only use objects when there is a real need for them (typically in OOP everything is made an object).

The initial version 0.01 may not make the idea of LOP fully visible, because quite a number of the functions provided have traditional names. So there is a function Print that should really be called ConsoleWriteType or ConsoleWriteObject but I hadn't the heart to throw this at you (but canonical names will be there soon at least as aliases). Typically LOP makes a lot of sense, because if I write

   String s=UrlRetString("");
then I won't have to tell you lengthy stories about how to use this interface and which objects to create (there are none).

This brings us to Get and Ret:

  • Get means that the following parameters are output parameters
  • Ret means that the following parameter is the return value
The typical simple LOP names are:


which may be extended, combined and modified (more about this later).


modulecontentmain functions
allcentral import modulenone
benchmarkbenchmark timingFpBenchPrint DelegateBenchPrint FpRetSec DelegateRetSec
dgdelegate conversionFpRetDelegate
dirfinddirectory searchingDirFindFile DirFindFileCall
printprimitive console outputPrint PrintLine
strstring alias functionsStrCat StrCatFmt StrCpy StrCpyFmt
timerhigh resolution timer
(the usual Windows QueryPerformance type)
TimerRetCount TimerCountRetSec
typeprimitive D datatype abstractionTypeRetTpi


wordword typemeaning
Benchactiondo benchmark timing of code
Catactionconcatenate to String
Delegateobjectnative D delegate (object + method pointer)
Dirobjectfile system directory
Findactionsearching in a data structure (slow)
Fpobjectfunction pointer
Getactionintroduces out parameters relative to the main object
Printactionoutput to console
Secpropertytime measured in seconds
Setactionintroduces in parameters relative to the main object
Strobjectalias for char []
Retactionthe following word specifies the function return value
Timerobjectable to return a counter value
Typeobjectabstraction for the D primitive data types

FrontPage | News | TestPage | MessageBoard | Search | Contributors | Folders | Index | Help | Preferences | Edit

Edit text of this page (date of last change: January 25, 2008 22:36 (diff))