Language Oriented Programming Discussion

As a side-note, one recurring pattern I like on Wiki is to have a separate discussion page for a topic. Helmut might want to cut the discussion portion out of this LanguageOrientedProgramming and (at least for now) and paste it to LanguageOrientedProgrammingDiscussion. That will let him use the LanguageOrientedProgramming page to clearly articulate LOP.

-- JohnPassaniti

ThankYou for your suggestion. As a newcomer I appreciate any helpful hint. I left some of the questions on LanguageOrientedProgramming because they seemed to push me in the right direction. But anyone is invited to change this arbitrary separation.

I am very surprised how this developed. Being new to the WikiWikiWeb (4 days) I had no high expectations. Now I'm very impressed how open-minded, tolerant, curious, respectful, warm and pushing this community is. I feel at home!


Questions:



What's with the abbreviations in the example on the LanguageOrientedProgramming page? How is that more natural than using the full word? Str vs. String? Dim vs. um, Size? How does that fit into LOP? -- SunirShah

LOP demands unambigous words and sentences. THELOP implements this on top of ThelopHostLanguage's (like on this "c-like" language in the example). There is a tradition in C to use "str" in functions (strstr, strlen, strchr ...) that work with strings. I'm pretty sure that most C programmer would feel comfortable with functions like StrFindStr, StrFindChr or StrClear. So - at this point - the word String (in C) remains still available for building a string object.

If the language X offers a String data type, fine. Change the word "Str" in the example above to "String". Other changes will be needed. No principle of LOP is violated. Readability doesn't suffer. THELOP tries to be language independent and to create a host language independent, reusable vocabulary but not by enforcing the change of built in names, types or grown habits.

In C there are a "sizeof" operator and a "size_t" data type that produce and hold the low-level memory size of data elements measured in C-bytes. Following the principles of LOP the word "Size" must not be reused for something quite different like the number of elements in an array or collection. So ThelopForCee? uses the word "Dim" for this purpose. If a language (e.g. Java) doesn't support the idea of a low-level memory size then we may still use and need the word "Size" to express similar ideas (e.g. FileByNameGetSize or ObjectGetSizeFlat). But as there is a built in "array.length" and a tradition to use the word "Length" for the number of elements ThelopForJava? will adapt to this practise.

THELOP tries to keep names short. But abbreviations only make sense for the most common words. It seems to make sense to abbreviate "Delete" to "Del" (or "Insert" to "Ins") because these words are used so often. It pays off. But it doesn't make sense to abbreviate "ScannerGetResolutionMax" to "ScGetResMax".

It never makes sense to abbreviate a word, especially because you're lazy. Learn how to type. Not only is it harder to read, but it's harder to write. "How, did he abbreviate this? Or that? Which abbreviation? How do you spell that abbreviation?"

You may get away with "slang," though. For instance "max" is slang for "maximum." Slang abbreviations mostly come from mathematics.

C has those stupid names because linkers used to have a six character external identifier limit. Crippling your SystemOfNames by C's legacy support of linkers from the 1960's is not useful. Using "dim" is not better than using "length," which is clear. -- SunirShah


See also: LanguageOrientedProgramming ThelopLanguage


CategoryThelop


EditText of this page (last edited November 29, 2009) or FindPage with title or text search