WelcomeUser Guide
ToSPrivacyCanary
DonateBugsLicense

©2025 Poal.co

795

Microsoft has a framework called WPF. Whilst nice in some ways, it isn't portable, has tons of bugs, and insane, over the top architecture, and tons of issues which were never fixed. Whilst it can do a lot, a lot of the design decisions leave a lot in terms of questions. For example, why do tree views not have context to their parents? Why are dependency properties so retarded?

After a while, i looked into the world of GTK. Wasn't a fan. And QT came into the picture. Now, outside of not knowing jack about the framework, I somehow become more productive in C++ and QT than i did in WPF. Sure, the app wont have the look and feel polish, but it can run everywhere, it has tons of libraries, and its pretty fast. It also leaves you with tons of casting options out of the box, which makes IO super convenient.

Overall, I'm done with Microsoft, however look out for my new side project being released later on this month

Microsoft has a framework called WPF. Whilst nice in some ways, it isn't portable, has tons of bugs, and insane, over the top architecture, and tons of issues which were never fixed. Whilst it can do a lot, a lot of the design decisions leave a lot in terms of questions. For example, why do tree views not have context to their parents? Why are dependency properties so retarded? After a while, i looked into the world of GTK. Wasn't a fan. And QT came into the picture. Now, outside of not knowing jack about the framework, I somehow become more productive in C++ and QT than i did in WPF. Sure, the app wont have the look and feel polish, but it can run everywhere, it has tons of libraries, and its pretty fast. It also leaves you with tons of casting options out of the box, which makes IO super convenient. Overall, I'm done with Microsoft, however look out for my new side project being released later on this month

(post is archived)

[–] 1 pt (edited )

I'm specifically talking about generic functions using e.g. (void data, int (do)(...), size_t size, ...). This is NOT pop vtable polymorphism.

Void* gets a bad rap because people abuse it to implement C++ virtual func polymorphism in C. User code has types which it retains on the user side of the generic interface struct foo *f = malloc(sizeof(struct foo)) is actually a generic call made in good C style. malloc doesn't know anything about foo yet is able to allocate a foo because the necessary type info "size" is received as a parameter. Notice the lack of an explicit cast for f.

In the code style I'm talking about you would never cast a void pointer. You don't know what it is. You don't want to know. Does malloc care what type it returns? No. That's what void* means.

You would also never try to extract a function pointer from a void* since you're not interested in polymorphism. Virtual calls are not in this vocabulary. qsort_r takes a comparison operator int (*compar)(const void *, const void *, void *). This is generic not polymorphic (in the C++ style). There is no base class or vtable. qsort doesn't need to query the void* data to see how to compare it. It doesn't care. All it needs to do is count, compare, and swap elements. The parameters reflect this. The single non-void type is int for control flow.

This style of generic is very good for language interop and systems programming. Why? Because it's not prematurely monomorphized. It can be, but doesn't need to be. That's an advantage.