5 ms·
I feel like one of the big reasons package managers aren't great with C is because of the way namespaces work. It's not easy to have a medium-large codebase an
by mk_chan 6y ago
I feel like one of the big reasons package managers aren't great with C is because of the way namespaces work.
It's not easy to have a medium-large codebase and just freely add a dependency because maybe this library causes variable or function name clashes. Even worse would be a macro that screws with your code.
There isn't even a simple solution like preprocessing everything in the downloaded library and adding a known prefix to every namespace encroaching identifier I think.
- slezyr 6y agoAgree. There is a reason why function names like exist. > gtk_app_chooser_widget_set_show_recommended > gtk_tree_model_filter_convert_child_iter_to_iter
- typon 6y agoI don't know how anyone can develop serious projects in C due to this exact reason.
- bzb4 6y agoPeople have been developing serious projects in C for decades, so it clearly works.
- ironmagma 6y agoFor limited and questionable definitions of “works,” yeah. There is a reason C++ is much more popular, and it’s not the exception handling.
- fsociety 6y agoMinimal dependencies is always the answer.
- typon 6y agoExcept it isn't because why would gtk need to prefix their functions and structs with these ugly names? Namespaces is the answer to solving problems arising from a lack of namespaces.
- OnlyOneCannolo 6y agoIt's really not that much different from anything else. gtk_app_chooser_widget_set_show_recommended gtk::app::chooser::widget::set_show_recommended gtk.app.chooser.widget.set_show_recommended