diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-11-08 21:29:56 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-11-08 21:29:56 -0800 |
commit | b766f5f8747166b688413d15375880be510d8af6 (patch) | |
tree | 7d97f184e3f50fe5147e1ba71fc433dc215e4a59 /factorial.mu | |
parent | 92e3f56ef967185f19522e698872ff61ef4ef284 (diff) | |
download | mu-b766f5f8747166b688413d15375880be510d8af6.tar.gz |
2404 - ah, finally a useful assertion
And it caught a bug: I mean to always update type names and types in sync. The last month or so I've been getting reluctantly but inexorably converted to the need and value of a type system. First I thought I just need a minimal but rigorous type system to avoid memory corruption and security issues. Now I think I also want it to be expressive enough to be able to express what data different phases in a compiler read and write, and to be able to designate specific fields as 'fully computed' so that we can statically check that phases wait until their data is available. The phase-ordering problem in a compiler is perhaps the canary in the coal-mine for a more general problem: even small changes can dramatically explode the state space if they violate assumptions previously held about the domain. My understanding of when type pointers are null and not null is immeasurably more nuanced today than it was a week ago, but I didn't need the nuance until I introduced generic functions. That initial draft of a hundred lines bumped me up to a much larger state space. How to make it more obvious when something happens that is akin to discovering a new continent, or finding oneself teleported to Jupiter? Assumptions can be implicit or explicit. Perhaps a delete of an assertion should be estimated at 1000 LoC of complexity?
Diffstat (limited to 'factorial.mu')
0 files changed, 0 insertions, 0 deletions