Re: If you were inventing CoBOL...

From: Robert Wagner (robert_at_wagner.net.yourmammaharvests)
Date: 09/12/04


Date: Sun, 12 Sep 2004 12:01:10 GMT

On Sat, 11 Sep 2004 15:06:43 -0400, "Rick Smith" <ricksmith@mfi.net>
wrote:

>
>"Robert Wagner" <robert@wagner.net.yourmammaharvests> wrote in message
>news:mt76k0dbt25is9dnsgmqcfqj3nehr293hc@4ax.com...
>> On Fri, 10 Sep 2004 19:56:15 -0400, "Rick Smith" <ricksmith@mfi.net>
>> wrote:
>>
>> >"Robert Wagner" <robert@wagner.net.yourmammaharvests> wrote in message
>> >news:2514k09nj41epdgrmsgiejth6lh0kpc8n5@4ax.com...
>> >[snip]
>> >> I wish we could invoke a method the way we call an intrinsic function
>> >> -- by saying its name. A method is a verb.
>> >
>> >The name of a method is a noun.
>>
>> It is when it's the object of INVOKE, in which case it should be
>> written in gerundial form. For example, the name of the method that
>> writes to a Dictionary should be 'putting' rather than 'put'.
>
>Mr Wagner, consider that a method is an identified, perhaps
>named, procedure (function, process, recipe, etc.) for doing
>something. Now consider the difference between
>ChocolateCake:'Baking' and ChocolateCake:'Bake'.
>The first suggests the recipe itself. The second a command
>to follow the recipe.

Compare 'Start baking a cake' to 'Start bake cake'. The latter is how
two-year-olds talk.

>One other point, Mr Wagner. INVOKE in COBOL has
>a similarity to LET in BASIC. It is not necessary for one to
>mentally process the word to understand that a command
>is to be executed, though INVOKE is necessary for syntax.

In 'Let A take the value of B' and 'Let A equal B', the object of Let
is A. There is no need to modify the verbs because they are not the
objects of Let.

>Consider that
> [Invoke] EmployeeMaster:'Read' using EmployeeRecord
>is understandable without 'Invoke' and, under certain conditions
>is equivalent to the COBOL statement
> Read EmployeeMaster into EmployeeRecord.
>That is, under certain conditions, method names have an
>equivalence to COBOL verbs and may be considered as
>extension to the instruction set.

This is true. It explains why Inline Invocation is better than INVOKE
-- because it lets us say the verb in the same way we say normal Cobol
verbs such as READ.

>Given the subject of this thread, Mr Wagner, would your
>COBOL instructions be READING, WRITING, ADDING,
>SUBTRACTING, etc.?

That would be wrong because they are not preceeded by a verb.

If they were, the form would be PERFORM READING, DO WRITING, CARRY OUT
ADDING, etc.



Relevant Pages

  • Confessions of an "OO Foreigner"
    ... in COBOL or any other programming language/tool). ... to translate and actually THINKING in that language. ... have been correct about - even though I lost) was the very "INVOKE" statement ... OBJECT-REFERENCE if "invoke" is the correct word at all. ...
    (comp.lang.cobol)
  • Re: Web Services and COBOL (Fairly long post, but I dont have time to write a proper article on it)
    ... Menu driven application - from the Trigger start the App ... interoperability in COBOL. ... invoke EventManager "new" returning os-EventManager ... However the web service, although being around 4000 lines of OO COBOL ...
    (comp.lang.cobol)
  • Re: Confessions of an "OO Foreigner"
    ... > in COBOL or any other programming language/tool). ... > to translate and actually THINKING in that language. ... > - Is INVOKE really the correct verb? ... when the High Priests of COBOL guarded the Holy Source Code and made ...
    (comp.lang.cobol)
  • Re: Heres one problem
    ... So given your format, what percentage of COBOL programmers do you think actually give a picture of data items, WITHOUT a final period/full Stop? ... invoke os-Collection "finalize" ... invoke a-OrderedCollection "finalize" ... A tutorial should demonstrate best practices, ...
    (comp.lang.cobol)
  • Re: Confessions of an "OO Foreigner"
    ... There is no need to use verb INVOKE ... If INVOKE is used, which object does it belong to? ... > in COBOL or any other programming language/tool). ... > to translate and actually THINKING in that language. ...
    (comp.lang.cobol)