Issue #65 new

Constants

Leon Arnott
repo owner created an issue

Constants (variables whose values cannot change) can provide these benefits: Runtime errors could be produced when they are (set:) more than once accidentally The variables and their values could be taken out of the history state, saving save-file size and runtime memory. * The Twine IDE could, when made aware of constants, include tooltips informing of their values - ideal for changer commands attached to hooks, in particular.

I'd originally been cold on adding an explicit "constant (set:)" as I believed that most people would simply not think to use it – and, I'd instead wanted to implement some static analysis that verifies which variables are only (set:) once, and regard those as constant. But, errors would be impossible like this. And, the fact that unset variables currently have a value of 0 is a bit of a roadblock currently.

Comments (0)

  1. Log in to comment