| 4 | |
| 5 | == Proper Timeout mechanism == |
| 6 | |
| 7 | as part of simplifying the complicated things: a timeout keyword. |
| 8 | the semantics and what it should actually do are debatable, but there should be an option for each scenario. |
| 9 | for example, closing down a bad request, or maybe just resuming the code flow, maybe forcefully releasing resources, etc. |
| 10 | |
| 11 | I saw timeout integrated in the TCL language. (they had the os be the external "superviser" managing the time) |
| 12 | I think erlang also has it, I don't remember maybe it was called 'after'. |
| 13 | ofcourse erlang is a very different language, and its design and constructs reflect that. |
| 14 | |
| 15 | with the advent of c#5 it is now easier for the developer: async, await .. it's harder to get this wrong. |
| 16 | |
| 17 | ideally, the language can help the developer not even get to deadlock situations, race conditions etc. |
| 18 | no shared state was erlang's solution, there are coroutines, mailboxes and message-passing in other languages. |
| 19 | making the right constructs go a long way in this regard. |
| 20 | in Eiffel, they now have scoop, which as i understand is something like a locked access to a resource, without manually wrapping the value in a class to do the locking. it solves a different part by (sort of) declaring dependencies. |
| 21 | |
| 22 | I think it is too complicated for a novice programmer to get right in C#. maybe cobra can provide an alternative way, where the tricky parts will be done by a library or compiler. |