airstruck wrote:
I intended it more as "hey you're smart enough to use a library that handles the low level details for you so you can get down to the business of creating your UI without a bunch of fussing around."
It's interesting how this got turned around from me suggesting that users were smart enough to cope with a more rich event listener API into me apparently suggesting that users are stupid by working on a library that hides time-consuming implementation details behind a convenient high-level abstraction, in the interest of boosting productivity.
The problem is that when a library does something in a too specific way the users end up being discouraged because changing that behaviour is too difficult, so they end up throwing it away and even implementing their own, it's more of a psicological problem.
Most people start a project and when they don't find their perfect tools start to do Yak Shaving to fix the problem, Kikito wrote a great post about it too.
You as the owner of the library may not be able to see this, since it does exactly what you need it to do, and you know the internals so if it didn't do what you wanted you would easily fix it; well your solution may not be perfect for everyone, resulting in people getting frustrated when they can't do what they need.
Providing low level stuff is a great way to help fix this, you let the user easily change how everything works, of course you can provide sensible defaults as a high level feature, just let the users get to the low level stuff as easy as to the high level.
airstruck wrote:
You can if you feel strongly enough about it to expose all those functions instead of just complaining about built-in functionality. There's a
ticket open that mentions this. I'm not going bother with it any time soon, because the default functionality suits me fine, but feel free to make a pull request. It wouldn't take much effort.
Currently I don't have a project where I would like to use your library, if I ever have one and I happen to need that feature I'm gonna help you
airstruck wrote:
Of course UI libraries are concerned with user input. Receiving user input is probably the most important thing a UI does. Providing some level of abstraction for dealing with user input is a natural thing for a UI library to do.
Well handling the input is what they do, so the abstraction would be "Okay, what's the input you have? I'll handle that for you" instead of "I'm gonna take this input and do this stuff, hope you don't bother"
I'm glad your library can override the default behaviours, that is a pretty nice thing. Can I simply, unhook the default behaviour entirely? If you can then your library does pretty much what Kikito and I are asking for, offers defaults, doesn't force you to use them, provides a way for defaults to not be used at all.
airstruck wrote:
In this case, an abstraction was necessary because the library works with multiple backends that expose user input in different ways. I wanted to be able to use the library on top of either Love or SDL without having to write implementation-specific input handling code.
Well yes, your library is pretty cool on handling different backends.
The user could have done that if you provided a nice API too, again I don't complain but you should know that even though no one has tried before you, writing a UI library which is framework agnostic and uses backends to wire up to them should be totally possible. Just provide a nice API and you can wire up any backend you would like, this is of course pretty much harder if the UI library already wires itself up to the input, you can only use the library in the backends it targets.
airstruck wrote:
Criticize all you want, but complaining about the inclusion of default functionality that's easily overridden isn't going to convince me not to provide that functionality.
Fine with me I'm not trying to convince you, not saying my way is better, just pointing out there are different points of view so you should respect them all even if you don't think like them. Kikito also tried to say this and I think that is the reason he didn't follow the discussion, because there isn't a definite conclusion, your point of view won't change, neither his or mine, no matter how much we discuss