Which raises a different issue:

The current Kona parser in file p.c has a "capture"
function with a case structure handling the cases:
-  Conditional
-  Paren
-  Bracket
-  Brace
-  Number
-  Quote
-  Symbol
-  Name
-  Verb
-  Adverb
-  End

Much of the current code for colon ":" is in the verb section.
This may also not be appropriate.
Sounds like it needs another case for "Control" to address
"Return".

On Thu, Oct 18, 2012 at 4:59 PM, Tom Szczesny <[email protected]> wrote:
> Your points are well taken.
> I had not noticed that the K reference manual had "Return"
> in the controls chapter.
> "Amend" is not in the verb chapter for "Amend, Index, Apply
> & Assign" and they are all called "constructs".
> "Conditional" is in a separate chapter for Conditionals
> "Monadic case" (with Each) is in the chapter for Adverbs.
> "Resume" and "Return" are both in the chapter for
> Controls and Debugging.
>
> My background is in APL.  In A+ "Result" is  considered a
> "nonscalar monadic primitive function" (a.k.a. verb).  See
>    http://www.aplusdev.org/refman.html
> and then click on Nonscalar functions.
> I've been viewing this from an APL, A+ perspective, which
> is probably not appropriate.
>
> As far as "Return" being described as "exception handling",
> it's sort of a moot point in my case, as I need to implement
> "Return" for Kona in C which does not have any built-in
> exception handling facitlies for me to use anyway.
>
> Tom
>
>
> On Thu, Oct 18, 2012 at 4:29 PM, Boyko Bantchev <[email protected]> wrote:
>> On 18 October 2012 21:30, Tom Szczesny <[email protected]> wrote:
>>> ................
>>> 1)  Amend
>>> 2)  Conditional
>>> 3)  Monadic case (with each)
>>> 4)  Resume
>>> 5)  Return
>>> So, in K, the control structure is implemented as a special case of a verb.
>>
>> Actually, none of the above is anything like a verb.
>> Specifically, the one under discussion, 'return', is described in the
>> 'Controls' chapter.  So K's return is a control, just as it is in J.
>>
>>> ... probably even better described as exception handling
>>
>> Hardly so.  First, raising an exception does not return control to
>> a caller; rather, it seeks for a handler (catcher).  Second, in doing
>> so, as many functions as necessary can be exited at once.  For raising
>> exceptions, similar to other languages, J has the 'throw.' control.
>>
>> The closest to J's (or K's) return from other languages is ... return.
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to