Window creation, for phobos?
Adam D. Ruppe via Digitalmars-d
digitalmars-d at puremagic.com
Thu Jan 29 06:45:18 PST 2015
On Thursday, 29 January 2015 at 11:17:32 UTC, Mike wrote:
> Is the concept of a *window* even that platform agnostic?
Is writeln even platform agnostic? I've used targets where it
doesn't do anything.... including Microsoft Windows with the gui
subsystem.
Generally, I think it is a mistake to reject something that is
good for a great many users just because it isn't available
everywhere. If it isn't right for your target, just don't use it.
I would caution against requiring the support libs in Phobos; we
don't want programs to fail to start because Xlib isn't
installed, for example. But there's ways to do that.
> I thought that was mostly a desktop metaphor.
Any call to a create window function might fail at runtime, on a
platform with no graphics support, all window creation can throw
an exception. On a platform with just one screen, any beyond the
first might throw.
A gui toolkit would probably need to do something about that to
keep things like pop-up message and dialog boxes working, but for
the basic stuff just saying it might throw should be good enough.
More information about the Digitalmars-d
mailing list