Stewart's Utility Library 0.10 release - now exclusively for D2

Stewart Gordon smjg_1998 at yahoo.com
Sun Apr 1 12:22:01 PDT 2012


On 01/04/2012 18:27, Dmitry Olshansky wrote:
<snip>
> I gave this a brief look, the console stuff for windows caught my eye.
> No offense, but I totally expected console module to do coloring or some other cool
> terminal stuff. As is it looks like a workaround for stdio.

I'm not sure what it would take to do stuff like that.  SUL isn't a Windows programming 
library - it's a utility library that aims to be as platform-independent as possible. 
Though some bits still need implementing or testing under platforms other than Win32 
platforms (anyone want to help?).

The console module was created to get around three problems with stdio:

- no codepage support
- EOF assumed to be false unless known otherwise
- line of output is lost when EOF of stdin is reached (bug in Win9x, though fixed in Win2000+)

Still, I wonder how adding the "cool terminal stuff" of which you speak would go down. 
One worry is whether it'll detract from the primary purpose of the module....

> BTW I think dgwrap can be safely yanked out, see
> http://dlang.org/phobos/std_functional.html#toDelegate

Yes, I've discovered that.  And I've noticed it's more general than dgwrap.  I guess I'll 
have to experiment with it.

But I still wonder if there's a way that it could be made to work with variadics and 
whatever else.  (Speaking of which, does anyone still use C-style or D-style runtime 
variadics, or have variadic templates taken over?)

Stewart.


More information about the Digitalmars-d-announce mailing list