--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/fltkcoredev/a1ad0725-7ffd-4a63-9f86-7413d41e1eaen%40googlegroups.com.
On 10/22/25 04:12, 'melcher....@googlemail.com' via fltk.coredev wrote:
2: we don't want any(?) / much(?) / templates(?) C++11 in the API, or at least have an old style alternative.
Rationale: we want to stick with Fast and Light, and we acknowledge that FLTK shines as a library with many language bindings (Rust, Lua, Ruby, Python, ...). If we go full steam C++ templates, we loose all those users. If we don't add "modern" APIs, we will not get "modern" users.
Comment: there is no perfect solution.
Here's a thought, just to explore an idea:
Assuming we really were motivated to provide templates through the API, and let me emphasize I don't think we are, or should be, but just to explore the possibility..
We probably could provide those modern users with alternate include files that provide templates thru the API, e.g.C++ uses no .h extension on "modern" includes, hence that first form.
- #include <FL/Fl_Box> // access FLTK internals as templates (instead of #include <FL/Fl_Box.H>)
- #include <FL/Fl_Box.HH> // ditto
Or if we really need special filename extensions for some reason (doxygen, cmake, etc), we could make up our own, e.g. ".HH"
Neither technique would involve re-implementing entire widget APIs - that'd be crazy. These files might just be two line files that just #define a macro and #includes the normal .H file, the macro setting would enable the "modern" methods via #ifdefs, similar to how our ABI macros enable ABI breaking features.
Anyway, just a thought. I'm not seriously considering this; any programmer choosing to use FLTK should really not expect "modern", and we might not want to even try to attract those kind of "modern" users, as means of "staying in our lane", which has served fltk 1.x pretty well, honestly.