Skip to content

Clarification in the docs #17

Description

@jasonmhite

Hello again. While I was working on the stuff in #16 I noticed there is a point of confusion in the docs. Under the "commands" section it says "When a command requires an argument, it pops a value from the stack. If the stack is empty, a zero is provided instead."

This is not true for most of the commands; this is the internal behavior when pop is called on an empty stack, but most commands don't trigger that since they are guarded by if (count(s0) > ..) and the observed behavior is instead that the command becomes a noop. It is true for others, e.g. sum. This makes things a bit confusing and could probably stand to be clarified (or made consistent in the code if you prefer).

Again, nice project. It's been fun poking around and I appreciate how clean the code is.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions