While LVGL is super-universal due C99 support, this does not means users MUST stay with C99 only. I suspect, many people will be ok to use something more advanced.
With CPP it would be possible to use chained calls, especially useful for:
describe layouts
fill (CSS) classes with style properties
implement some things of reactive frameworks
I’m not going to promote OOP. I mean nice syntax, impossible with C (unfortunately).
No idea about maintenance cost. Sorry, if question looks naive.
My question is, can this be supported “officially” as out of box option? Or, at least, can this be considered seriously? If yes, then we could follow to details, and thinking how to minimize support’s cost.
I’m not one of lvgl core devs. May be they have different vision about lvgl future and priorities.
It’s not principal for me, if CPP wrapper will be in the same or in separate repo. Question is about maintenance of next versions. Who will be responsible for that? Micropython binding is alive only until maintainer “exists” (thanks to @amirgon for his great work).
I could try to create CPP draft, but:
I don’t like to become maintainer.
I have skills of software architect, but no experience with CPP - code quality will be very intermediate. So, i could care about methods/signatures, but this needs someone more experienced to finish properly.
Theoretically maintaining a ninging like this shouldn’t be so complicated if choose wisely which parts should be converted to CPP.
@amirgon
How much effort does it take to maintain the MP binding repo if there are no major (MP breaking changes)?
It seems to me answering questions take more time. Is that correct?
The Micropython binding is generated automatically from lvgl header files, so as long as changes don’t break anything - it’s zero effort to maintain it.
On the other hand, building the binding script on the first place - was a big effort.
Migrating to v.7 required many discussions and additional effort.
In case of C++ binding, it would take some effort to bring it up, but less than Micropython because C and C++ play nicely together (easy to call C from C++, can use C structs on C++, no need to handle memory garbage collection, etc.)
If the C++ binding would take the same approach as the Micropython binding and be generated automatically from lvgl headers, it would take zero effort maintaining it for non breaking changes once it’s stable enough.