Squirrel

The programming language
Welcome to Squirrel Sign in | Join | Help
in Search

Documentation issues

Last post 08-10-2008, 11:24 AM by alexionne. 3 replies.
Sort Posts: Previous Next
  •  08-08-2008, 9:47 AM 2678

    Documentation issues

    Hi!

    I really like Squirrel language. At the moment, I'm busy with projects I work on, but I found some time to quickly read Squirrel 3 documentation. Here are several issues I found in .chm file:

    1) Functions - Tail recursion section

    "Tail recursion is a method for partially transforming a recursion in a program into an iteration: it applies when the recursive calls in a function are the last executed statements in that function."

    Threads (at the end)

    function state1()
    {
    ::suspend("state1");
    return state2(); //tail call
    }

    state2() is not recursive call, because it is in state1() -> it is not clear if this will be interpreted as tail-recursion call or not? If yes, tail-recursion definition needs some clearance.

    2) Metamethods - example uses delegate keyword. Is this syntax still accepted, or documentation need update?

    3) Methametods - _cmp description - is it also invoked by operator?
  •  08-09-2008, 4:25 PM 2681 in reply to 2678

    Re: Documentation issues

    1) indeed I should clarify on the difference between tail calls and tail recursion. Is not easy to explain a tail calls in words, if you have a good definition for that I'll be glad to put it in. Anyway I'll fix that.

    2) I've fixed it, thx.

    3) no is not ivoked by ?, only by >, <=, <, >=, and <=>

    thx for the report

    Alberto

  •  08-10-2008, 11:21 AM 2685 in reply to 2681

    Re: Documentation issues

    1) Hm, I'll have another look at documentation, it seems it was not all clear to me in the first place. 3) ups! my mistake, I forgot to write before ? :-) The problem here is operator does not exist in the list of operators which call _cmp. "_cmp invoked to emulate the = operators"
  •  08-10-2008, 11:24 AM 2686 in reply to 2685

    Re: Documentation issues

    There is a problem with "Quick Reply" option - it has somehow eaten &lt; and &gt; chars!? anyway, operator &lt;=&gt; is not mentioned in _cmp description.
View as RSS news feed in XML
Powered by Community Server, by Telligent Systems