fix: Always compute cells without clocked expressions using current values #91

Merged
glen merged 2 commits from contemporaneous_references into main 2023-04-30 16:19:13 +00:00
Owner

Prior to this change, when a cell was clocked, it was always computed with prior values of referred-to cells. This had the effect, for example, of making cells defined only with a base expression as a total of a column, for example, to be out-of-date in that they would take on the value of the total of the prior values of the column, not the total of new current values of the column. This behavior was very counterintuitive.

With this change, updates of cells that have no clocked expression are delayed until after clocked expressions have been recomputed based on prior values and their cells' current values have been updated. Then the computations of those base-only cells use all of the new current values, leaving the spreadsheet in a (maximally) self-consistent state.

Resolves #90.

Prior to this change, when a cell was clocked, it was always computed with prior values of referred-to cells. This had the effect, for example, of making cells defined only with a base expression as a total of a column, for example, to be out-of-date in that they would take on the value of the total of the prior values of the column, not the total of new current values of the column. This behavior was very counterintuitive. With this change, updates of cells that have no clocked expression are delayed until after clocked expressions have been recomputed based on prior values and their cells' current values have been updated. Then the computations of those base-only cells use all of the new current values, leaving the spreadsheet in a (maximally) self-consistent state. Resolves #90.
glen added 2 commits 2023-04-30 16:18:54 +00:00
Prior to this change, when a cell was clocked, it was always computed
  with prior values of referred-to cells. This had the effect, for example,
  of making cells defined only with a base expression as a total of a column,
  for example, to be out-of-date in that they would take on the value of
  total of the prior values of the column, not the new current values of
  the column. This behavior was very counterintuitive.

  With this change, updates of cells that have no clocked expression are
  delayed until after clocked expressions have been recomputed based on
  prior values and their cells' current values have been updated. Then
  the computations of those base-only cells use all of the new current values,
  leaving the spreadsheet in a (maximally) self-consistent state.
glen merged commit 7b794f90b9 into main 2023-04-30 16:19:13 +00:00
glen deleted branch contemporaneous_references 2023-04-30 16:19:13 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: glen/teapot-spreadsheet#91
No description provided.