Hacker News new | ask | show | jobs
by qsort 1616 days ago
Compiler-enforced computational complexity would be an interesting part of that experiment. Could be part of the function declaration, for example:

    void constanttime doStuff(vector<whatever> v)
However, it would likely require extensive dedicated support and would necessarily be limited (hello, halting problem!). I could see that working and be useful for common complexity values, e.g. O(n^k), O(log n) etc.