[Felix-language] Futures

2014-11-11 Thread john skaller
the implementation of futures relies on a hack/implementation detail which I have disturbed reorganising the compiler. Here's the problem: I have implemented futures by spawning an fthread (fibre) which sends the result down an schannel. To get the result you read the schannel. More precisely you

Re: [Felix-language] futures

2012-11-26 Thread john skaller
Ok, I have a new interface for comment now. There is an important tutorial lesson here so please read carefully. Seem that "abstract types" are not documented so please read! /// open class Future { private interface future_private_t[T] { doget: 1 -> T; fetched: 1 -> bool; fet

[Felix-language] futures

2012-11-26 Thread john skaller
This is starting to look reasonable I think. Comments appreciated. Caveats etc after. /// interface interface future_t[T] { doget: 1 -> T; fetched: 1 -> bool; fetch: 1 -> 0; } /// implementation /// object future[T] (e:1->T) implements future_t[T] = { var ch = mk_schannel[T](); s

[Felix-language] futures

2012-11-16 Thread john skaller
I am thinking to introduce futures to Felix something like this: future x = f (y); println$ y; println$ x; In this guise, a future is yet another kind of variable evaluation strategy. Like a val, a future can be evaluated when the compiler chooses: either immediately, conc