Now, obviously the options/variables switch wasn't what compelled me to type this up. I think that with a window datum, you could have MUCH more control over things dealing with the browser. For example, a Close() proc(or, to follow suit, a Del() proc) would be called whenever the window closed. This would give the programmer more control of what to do after the window was gone. Sure, you could set can_close to 0 and make a link that does the stuff in client/Topic(), but that stuff would only ever execute if the link were the cause of it closing. All it would take was for someone to press Alt+F4, and your whole link idea goes to the scrap heap.
Sure, you could throw in certain checks to see if a value hasn't been passed after a certain amount of time, in which case you could send a default. But wouldn't it be more efficient to have it called neatly inside of a closing proc?
Aside from the aforementioned, there are still plenty of other proposed benefits from the /window datum! You could group windows to have certain default values, like background color for example. As an example:
window
var/bgcolor="#FFFFFF"
blackbg/bgcolor="#000000"
Display()
// In keeping with a certain popular library, I'd assume that the Display() proc would be what displays it.
src<<browse("..body{background-color:[bgcolor];}....")
// I'm not creative enough to think of an alternative to browse() to use here
...where you could then make new windows based on what type of background color you wanted.
Another possible benefit would be the ability to switch easily from focus of one window to another(can you say Focus() proc?). Also, ideally, you would be able to set vars to determine a popup windows screen location, as opposed to it popping up smack in the middle of the screen. If not complete control over the location(offsets), I would assume that this could at least allow one to set certain values for top-left, top, top-right, right, bottom-right, bottom, bottom-left, left, and center.
Rather than go on, I'll leave it at that. 4:35 AM is a bit too early(late, as a matter of fact) to do too much thinking, you know. Especially on an empty stomach.
Think about it!
Hiead