> - Stdio.IOBuffer is harder to type than ADT.struct. Can we rename it
>   to Stdio.Buffer? There is already IO in Stdio.

I tried Stdio.Buffer but then all types suddenly became String.Buffer.
I could not, at that time at least, be bothered to fix the
precompiler...

> - read_buffer dosn't return Stdio.IOBuffer.
>
> An expression of type { IOBuffer = object } cannot be assigned to a
> variable of type { IOBuffer = object(implements
> _static_modules._Stdio()->IOBuffer) }.

Well, yes, that is indeed a bother. The reason is sort of silly, the
precompiler is simply not assigning the correct type (it should be
rather easy, really, the program id is right there in new_program->id)

> - It would be great if we could type cast() properly, so we can tell
>   that (string)iobuffer is actually string(8bit).

Ah, yes, that, it would probably be somewhat easy to implement
specifically for cast using a type check callback.

It would however be very nice to have it genrally for all LFUN using
operators.

if( arg1 == obj && arg1[lfun) )
{
//  consume arg1, return type for call( arg1[lfun](arg2) )
}

else if( arg2 == obj && arg2[`lfun) )
{
//  consume arg2, return type for call( arg2[`lfun](arg1) )
}

-- 
Per Hedbor
  • IOBuffer us... Martin Nilsson (Opera Mini - AFK!) @ Pike (-) developers forum
    • IOBuff... Martin Nilsson (Opera Mini - AFK!) @ Pike (-) developers forum
    • IOBuff... Martin Nilsson (Opera Mini - AFK!) @ Pike (-) developers forum
    • IOBuff... Per Hedbor () @ Pike (-) developers forum

Reply via email to