Re:Again on 0-based vs. 1-based indexing
by Jtsummers on Wednesday January 20, 2021 @06:00PM
(#25853079)
I actually started writing a comment about that. Teaching VHDL (my experience) to most programmers is an entertaining experience because they expect effects to be immediate, not executed collectively and simultaneously but mediated by a clock or other mechanism. So in an HDL:
These two effects actually occur simultaneously, which is different again from what mathematically inclined learners might expect since there is still mutation. It is more akin to the common notation:
Where the ' indicates the next value of x or y (as opposed to the derivative). Or perhaps:
And many programming languages don't even have a good notion for similar parallel evaluation and assignment. Python does, with:
Common Lisp has psetf which permits this:
Languages with pattern matching/destructuring bind are your best bet for writing this directly without needing temporary variables.
[ Parent
| on HN ]
There are no comments on this comment yet.