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

Crossed-out arrows and fields #5

Open
dwhatley19 opened this issue Jul 22, 2020 · 4 comments
Open

Crossed-out arrows and fields #5

dwhatley19 opened this issue Jul 22, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@dwhatley19
Copy link
Contributor

In 6.031, many diagrams contain crossed-out elements, such as arrows and fields, and possibly entire nodes. These can be used to demonstrate the principles of mutability and reassignment. For example (http://web.mit.edu/6.031/www/sp20/classes/08-immutability/#@string_t_s):

image

These need to be supported by Snapdown.

@dwhatley19
Copy link
Contributor Author

dwhatley19 commented Aug 2, 2020

@dwhatley19 dwhatley19 reopened this Aug 2, 2020
@dwhatley19
Copy link
Contributor Author

Ability to have one variable point to multiple values (i.e., when at least one pointer is crossed out) is done:
https://web.mit.edu/dwhatley/www/snapdown/web/production.html#x%20-x%3E%20((String%20%22a%22))%0Ax%20-%3E%20((String%20%22b%22))%0Ax%20-x%3E%20((String%20%22c%22))

@dwhatley19
Copy link
Contributor Author

Ability to have multiple arrows (incl. crossed-out arrows) extending from a single array element is also done, pending possible layout tweaks:
http://web.mit.edu/dwhatley/www/snapdown/web/production.html#%231%20-%3E%20%22abc%22%0A%231%20-x%3E%20%22def%22%0Aa%20-%3E%20%5B%231%2C%20%22ghi%22%5D

@dwhatley19
Copy link
Contributor Author

Crossed out variables and fields proposed syntax:

sb -> (StringBuilder ~"a"~ ~"ab"~ "abc")
tb -> sb
~tb2~ -> sb

@dwhatley19 dwhatley19 added the enhancement New feature or request label May 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant