Thread with 7 posts
jump to expanded postceterum autem censeo c++ esse delendam https://consteval.ca/2024/07/03/initialization/
βͺi can get my head around constructors in c. i can get my head around constructors in rust. but i am not willing to touch them in c++ unless i am forced toβ¬
@hikari i used c++ for years but i think the moment it started to truly spook me was when i found out about the "explicit" keyword and why it exists
@mcc implicit conversions? π
@hikari Implicit conversions :(
And this turns out to go nuclear with Qt because all types have a Typename(QObject *) constructor, which in that context is the equivalent of Typename(Any type here)
@mcc aaaAAAAAaAAAaaaa
@hikari β¦and so this isn't a problem with *base* qt, because all base qt constructors are declared with explicit
but the first thing you do when you start writing qt is you subclass existing qt classes and create your own MyQtClass(QObject *) {} constructors
so if you don't know about the `explicit` convention and why the qt base libraries do it, you have just placed a landmine under your chair