3 ms·
I'm talking about supplementing a toolkit. Like, in iOS or gtk or QT or whatever, there are stock widgets (buttons, sliders, text boxes), but you can also add y
by rrradical 12y ago
I'm talking about supplementing a toolkit. Like, in iOS or gtk or QT or whatever, there are stock widgets (buttons, sliders, text boxes), but you can also add your own widgets, like a date picker. A date picker would be modeled completely differently from those other widgets, and so it needs a completely different data structure. This requires supplementing the existing types, which isn't possible in Haskell.
- codygman 12y agoThat date picker inherits from something though right?
- rrradical 12y agoRight. In OO, you can inherit, but in Haskell, you can't.
- codygman 12y agohttp://yi-editor.github.io/2014/09/05/oop/ http://yi-editor.github.io/2014/09/05/oop/
- codygman 12y agoAlso, I'm not sure why you'd need to inherit to provide this functionality. The user could just provide a monadic type the function to run the gui is expecting and extend it however they wish.
- rrradical 12y agoI won't claim to be an expert on this stuff-- I've only recently been studying this. But, from my understanding, if you have a tree of GUI elements, each of those elements needs to have the same type, and that type needs to be known ahead of time. It's possible I don't understand your comment. Would you mind pointing me to some sample code or blog post or something?