3 ms·
(Author here) I think the fact that Qt went with Javascript as the scripting language for QML wasn't a smart decision - especially resulting in poor type safet
by rubymamis 10mo ago
(Author here)
I think the fact that Qt went with Javascript as the scripting language for QML wasn't a smart decision - especially resulting in poor type safety. That said, they have improved the situation by a lot with required properties, Q_ENUM where you can now share enums between C++ and QML etc etc.
I don't agree that QML is just for simple UIs, that's exactly what I tried to demystify - my block editor is a very complex project spanning around 20,000+ lines of code - and still managed to be the most performant block editor in all my tests.
Contrary to you, I love the separation between the logic being written in C++ and UI in QML I think it's absolutely a great combo - QML is such a great language to write UIs in and C++ is a performant compiled language that (I, personally) love writing logic in. Also, communicating between C++ and QML components is straightforward with Q_PROPERTYs and signal and slots.
- samiv 10mo agoHello Yes sure I've heard that Qt6 improves the integration and type safety but I haven't tried that yet myself. Communicatingn with signals and slots and using Qt Property system is straightforward yes but even more straightforward is to when you don't have to use it. The real problem is when you change your properties or your underlying types or the methods, their names or signatures and NOTHING tells you which part of your QML code will be affected. You just have to.. kinda know. In practice you'll of course miss something and then it'll just blow up at runtime with some "bla bla is undefined" error. That being said if you're comfortable to use it and find it works for you more power to you. I'll just stick to my widgets. :)
- kalaksi 10mo agoI think the QML linter detects that but may require maintaining some extra files that tell which methods and properties are available in C++ classes. Not sure if they can be auto-generated if using C++ and more native tools since I've been using QML with Rust. Better type integration would be nice though.
- eek2121 10mo agoIIRC, There are also bindings for other languages, at least I know Ruby used to have one that I played with.
- tvshtr 10mo agoWould you mind elaborating on "I decided to make Daino Notes closed source due to difficulties in monetizing FOSS" ?. How do you plan to monetize this?
- rubymamis 9mo agoYou can see on the website: https://www.get-notes.com/pricing https://www.get-notes.com/pricing You can pay for the Pro version to use advanced blocks such as kanban, images,Drop cap. Also, the free version limits you to 10 notes. BUT, I'm planning to change that very soon, I will make all the current Pro features free and the only thing that will cost money will be cloud storage with real-time sync when I'll release the new mobile app.
- tvshtr 9mo agoAh! Thanks. It wasn't loading for me for some reason. Yup good plan, tying Pro to cloud features makes sense for subscription model.