Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document IsA Container #62

Open
2 tasks
tajmone opened this issue Sep 1, 2019 · 0 comments
Open
2 tasks

Document IsA Container #62

tajmone opened this issue Sep 1, 2019 · 0 comments
Labels
📖 Alan Manual Issues relating to "The Alan Language Manual" 💡 enhancement A new feature or enhancement request/proposal 🕑 pending implementation Approved changes waiting to be implemented 🕑 TBD contents To Be Done: pending contents work ⚠️ useful Priority: Low

Comments

@tajmone
Copy link
Collaborator

tajmone commented Sep 1, 2019

See also #45 on IsA Container.

In §2.4. Introduction to the Language » The SYNTAX we encounter the first usage example of IsA Container:

It is also possible to restrict the types of the parameters:

Syntax
  put_in = 'put' (obj) 'in' (cont)
    Where obj IsA object
      Else "You can't put that into anything."
    And cont IsA Container
      Else "Nothing fits inside that."

This restricts the parameter obj to being an instance inheriting from the object class (as opposed to an actor for example) and the parameter cont to a Container (an instance with the Container property).

It's worth adding a note/admonition there about the special use of IsA with a non-class.

@tajmone tajmone added 💡 enhancement A new feature or enhancement request/proposal 📖 Alan Manual Issues relating to "The Alan Language Manual" 🕑 TBD contents To Be Done: pending contents work ⚠️ useful Priority: Low 🕑 pending merge Task completed in dev branch, waiting to be merged into master. 🕑 pending implementation Approved changes waiting to be implemented and removed 🕑 pending merge Task completed in dev branch, waiting to be merged into master. labels Sep 1, 2019
@tajmone tajmone added this to the Alan Manual Improve Contents milestone Sep 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📖 Alan Manual Issues relating to "The Alan Language Manual" 💡 enhancement A new feature or enhancement request/proposal 🕑 pending implementation Approved changes waiting to be implemented 🕑 TBD contents To Be Done: pending contents work ⚠️ useful Priority: Low
Projects
None yet
Development

No branches or pull requests

1 participant