News for hackers. Stuff that matters.
Re:Metaprogramming custom control structures in C (2012) by danlugo92 on Saturday July 10, 2021 @01:47PM (#27795126)
9 out of 10 times good old `doSomethingWith(foo: Foo)` style C is better than c++/whatever `foo.doSomething()`.
Re:Metaprogramming custom control structures in C (2012) by BenFrantzDale on Saturday July 10, 2021 @02:04PM (#27795237)
Contemporary C++ encourages this too. There’s a place for member functions—even convenience ones—but algorithms operate on data structures; they needn’t be part of the data structures.
Re:Metaprogramming custom control structures in C (2012) by pjmlp on Saturday July 10, 2021 @05:41PM (#27796667)
Since STL was introduced actually, even if functors were a bit painful to write, however if you look at codebases like Android, there is some catch up to do with modern times.