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

Type propagation #848

Open
dethe opened this issue Jan 16, 2015 · 1 comment
Open

Type propagation #848

dethe opened this issue Jan 16, 2015 · 1 comment
Labels
Milestone

Comments

@dethe
Copy link
Member

dethe commented Jan 16, 2015

Types should propagate in a couple of ways:

  1. Dropping a typed expression into an any value should change the value to be that type.
  2. Dropping an any expression into a typed value should change the any expression to be that type.
    Original types should be stored in a "origType" attribute and restored when the dropped block is removed.

Note that these can cascade through a system if there were several any expressions nested and one becomes typed.
For arrays, if every value in an array is the same type, then returning an item from that array should be that type. This is where it starts to get a bit complicated, because we don't want to prevent putting a string into an array of numbers, for instance.

@dethe dethe added the Feature label Jan 16, 2015
@dethe dethe added this to the Custom Elements milestone Jan 16, 2015
@eddieantonio eddieantonio mentioned this issue Jan 16, 2015
@eddieantonio eddieantonio self-assigned this Jan 17, 2015
@eddieantonio eddieantonio removed their assignment Jan 31, 2015
@dethe dethe modified the milestones: Custom Elements, Drag and Drop fixes Jun 23, 2015
@dethe
Copy link
Member Author

dethe commented Jul 2, 2015

For arrays, I think a type dropdown on the array constructor should limit all values in the array to the chosen type (especially useful for C / Arduino / Java wrappers) rather than trying to guess from user interactions.

@dethe dethe assigned dethe and unassigned dethe Sep 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants