Runtime error and type checking is incomplete
Nobody has claimed this yet.
- Dominant language
- CoffeeScript
- Stars
- 57
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
The NetLogo compiler does a lot of typechecking for us, but, as soon as value is stored into a variable or procedure argument, we lose the type information. As a result, all of the compiler's typechecking must be duplicated at runtime, as well. Unfortunately, currently, many primitives don't do a good job of that, as demonstrated, for example, in NetLogo/Galapagos#363, but there are countless other examples.
We should implement this at some point. But, of course, adding all of these runtime checks will definitely induce a performance decrease to the simulation engine. But that's cost of "correctness", I suppose....
(Some work is already in progress for this on the wip-middle-layer branch.)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the wip-middle-layer branch and the failure described in NetLogo/Galapagos#363 first. Trace how types are lost when values enter variables or procedure arguments, then inventory the affected primitives; done would require complete runtime checking for the known cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- coffeescript, javascript
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100