Version 2 (modified by kobi7, 12 years ago) |
---|
Introduction
This is the wish list. Don't be shy. Jot down your wishes here, or if it's something that really needs to fixed or done, fill out a ticket. You can also start by mentioning these things on the discussion forum or IRC.
Proper Timeout mechanism
as part of simplifying the complicated things: a timeout keyword. the semantics and what it should actually do are debatable, but there should be an option for each scenario. for example, closing down a bad request, or maybe just resuming the code flow, maybe forcefully releasing resources, etc.
I saw timeout integrated in the TCL language. (they had the os be the external "superviser" managing the time) I think erlang also has it, I don't remember maybe it was called 'after'. ofcourse erlang is a very different language, and its design and constructs reflect that.
with the advent of c#5 it is now easier for the developer: async, await .. it's harder to get this wrong.
ideally, the language can help the developer not even get to deadlock situations, race conditions etc. no shared state was erlang's solution, there are coroutines, mailboxes and message-passing in other languages. making the right constructs go a long way in this regard. 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.
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.
Eliminate argument repetition in lambdas
Like many languages with lambda expressions, Cobra requires you to repeat arguments at least twice; once for the parameter declaration and once for using it:
.foo(do(a, b)=a + b)
I propose a "succinct" form for lambdas where the lambda is implied by prefixing the arguments with a tilde (~):
.foo(~a + ~b)
This will look extra sweet when stacking up multiple LINQ calls or any other API that makes heavy use of lambda expressions. Note that one disadvantage is that if the expression needs to use the arguments in a different order then you will have to use the full "do" form.