News for hackers. Stuff that matters.
Re:Implementing Algebraic Effects in C by nwmcsween on Monday July 31, 2017 @01:24AM (#14889656)
My dream for a language is a type system that can enforce runtime semantics, preferably at import.

  import 'mod::memcmp': O(1);
where O(1) is big O notation.
Re:Implementing Algebraic Effects in C by adrianN on Monday July 31, 2017 @07:20AM (#14890922)
That would be a very restrictive programming environment, or type checking might fail or produce ridiculously large runtime bounds. It is not decidable whether a given Turing machine has runtime O(n^k) for a particular k, even if you're given the promise that such a k exists.
Re:Implementing Algebraic Effects in C by tmzt on Monday July 31, 2017 @01:41PM (#14894252)
Could you make it an attribute of the symbol being exported, part of the contract, and use that to derive an estimated cost of the program?

I could see this being used to choose between allocators or schedulers given specific requirements.

Re:Implementing Algebraic Effects in C by mrkgnao on Monday July 31, 2017 @04:39AM (#14890366)