Hacker News new | past | comments | ask | show | jobs | submit login

I have seen that the biggest issue with C++ is that legacy C++ is quite hard to refactor to the new patterns. For example, I have been working on font substitution in LibreOffice, and I'd like to use a more functional style of programming, but I'm getting stuck because of an overuse of classes.

I've been reading Functional Programming in C++ by Ivan Cukic and I'd like to adopt this - it does require a lot of refactoring of this massive codebase.

Perhaps this is a massive, ancient codebase issue more than a C++ issue, though.




I think this is one place where you're totally working against the language.

Edit: I don't know how you can arrive at this conclusion given the history of the language. The STL isn't the C++ standard library.

I would love to discuss this more, but dang has limited and nerfed my account.


Not really. Look at the standard template library. It’s not really using classes with inheritance. It’s using non-member functions, often with iterators.

Ironically I’ve just learned, however, that lambdas are actually anonymous classes! I’m currently up to the bit in yhe book I referred to before that explains how to do currying in C++.

The more I read, the more I think I’m working against the code base than I am against C++. I’m actually very curious how ranges work, something the book talks about later.


Sorry, not STL, I meant the standard C++ library.

Edit: send an email to news@ycombinator.com




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: