Thelop Name Example

This page is intended to give a few examples of ThelopNames. They are built from ThelopWords according to the ThelopRules.


Some examples using C as host programming language (only prototypes are given):

   void StrCpy(char *dest,char *src);
   ERR FileCpy(char *dest_filename,char *src_filename);
   ERR ImageCpy(IMAGE *dest_image,IMAGE *src_image);
   char *PtrCreateFile(char *filename);
   IMAGE *ImageCreateImageRect(IMAGE *src_image,RECT *pr);
   size_t FileRetSize(char *filename);
   size_t StrRetLen(char *s); 
   size_t StrRetSize(char *s); 
   void StrGetSize(char *s,size_t *psize);
   void StrCvtUpper(char *s);
   void MouseGetPos(WINDOW *w,int *px,int *px);
   void WindowSetPos(WINDOW *w,int x,int x);

You may notice the uncommon usage of the words Get (that is in wide use) and Ret (introduced by THELOP). The word Get tells you that the results of a function are passed by (some kind of) reference:

   void DateGetYearMonthDay(DATE d,int *pyear,int *pmonth,int *pday);

while the Ret indicates that the result is passed by the function return value:

   int DateRetYear(DATE d);

If you use a programming languages that allows these different types of passing results, then the consistent use of Get and Ret is essential.

The ThelopLanguage tries to enable the programmer to name any existing function correctly and completely. This is a difficult task and usually no fun at all (try any API). The obvious next step is to improve the API and make it consistent and easy to use. If you build a new API then you can DoItRightTheFirstTime.

---

Gee, instead, why not write function names that people can read:

   void stringCopy(char *destination, char *source);
   Error fileCopy(char *destinationFilename,char *sourceFilename);

etc...Or, better yet, use polymorphism and objects:

   String::copy();
   File::copy();

There. Isn't that easier to read than all of those cryptic acronyms?


See also: ThelopWordExamples, ThelopRules, ThelopLanguage, ThelopDictionary, LanguageOrientedProgramming


Other examples: ByRefConsideredHarmful


CategoryThelop


EditText of this page (last edited September 1, 2001) or FindPage with title or text search