> why is not screen a module?
> the answer always have been: "for the same reason so sockets have to be
> in stream.d: modules cannot create new built-in streams".
> this is a valid reason for sockets which must be as fast as file and
> pipe streams and thus cannot be gray streams, but why can't window
> streams be gray streams?
The speed argument here too, and a question of ease of implementation.
> PS. actually, it is not clear why modules cannot create new kinds of
> streams. they already create objects, why can't they create
It's because pseudocode_tab and pseudodata_tab are fixed arrays. If you
were to change it into an extensible array of arrays, modules could register
their share of it.
> and what else is needed for new built-in streams created by modules?
There are 4 instances of 'case strmtype_window' in stream.d. These would
have to be replaced with C function calls, through function pointers.