| General > General Technical Chat |
| How many people code in C these days, and if so, why? |
| << < (66/99) > >> |
| coppice:
--- Quote from: IDEngineer on May 11, 2020, 10:26:52 pm ---That, and legacy COBOL code running government agencies.... --- End quote --- A real beauty of COBOL projects is it takes years to put together a replacement. So, even if the end approaches, it approaches so slowly you have plenty of time to react. |
| Berni:
Just because its OO and C++ does not necessarily mean its more reusable and modular. Its still perfectly possible to create a tangled mess that ties all of it into a monolithic blob that won't compile anymore as soon as you attempt to separate something from it. Yes sure you can get some nice clean code when care is taken to follow this OO thing and implement things trough these interfaces, hide all of its state inside privates etc. If done properly it can make for quite little overhead. Every object is its own self contained module that you can plonk down in to any project and have it run etc... Why wouldn't you want to program like this? Its perfect. But then theory meets practice and half way trough a project you find that actually this object needs to do something to this other object somewhere completely else and make a link to it, binding it to be dependent on that object, this happens a few more times along the way, gradually bonding things together. Then a wild manager appears and not only bumps the goal post over but also turns it 180 degrees, so suddenly a lot of core functionality must change a bit so things are moved around and more of a mess is made. Then the deadline starts coming up and the thing MUST go out the door this friday or they miss some sort of important marketing window. Suddenly nobody has time to think about anything modular, people taking a sledgehammer to that OO wall and exposing some variables public so they can quickly tweak it and fix a bug so they can move on to the other 100 bugs that need to be fixed by the end of the week. So just because you got OO in C++ doesn't mean its automatically more modular, clean and reusable. Its the guy behind the keyboard that determines how reusable code is, even if he is only using oldschool C with a few structs here and there to pretend being little OO when needed (not as pretty but it works) |
| SiliconWizard:
--- Quote from: Berni on May 12, 2020, 06:34:07 am ---So just because you got OO in C++ doesn't mean its automatically more modular, clean and reusable. Its the guy behind the keyboard that determines how reusable code is, even if he is only using oldschool C with a few structs here and there to pretend being little OO when needed (not as pretty but it works) --- End quote --- Yes of course. Badly used inheritance can lead to code that is basically impossible to reuse outside of its intended initial use (or would require convoluted ugly interfaces...) IMO modularity per se is best expressed with modules. You can still take a similar module approach with languages that don't inherently support modules. It just takes a lot of discipline. |
| engrguy42:
--- Quote from: Berni on May 12, 2020, 06:34:07 am ---Just because its OO and C++ does not necessarily mean its more reusable and modular. Its still perfectly possible to create a tangled mess that ties all of it into a monolithic blob that won't compile anymore as soon as you attempt to separate something from it. --- End quote --- Of course, but the exception does not define the rule. You can screw up anything. People love to raise specific issues (like inheritance) and say that since inheritance sucks the entire OO design idea is useless. Of course that's nonsense. If you don't like inheritance (I personally hate it and therefore never use it), then don't use it. But as an engineer/user, as I said, I LOVE the incredibly intuitive concepts and designs associated with it. So is it that most folks here don't deal with those higher level languages and design concepts because they're more about the lower level hardware systems? |
| madires:
Arduino is C++, just saying. ;D |
| Navigation |
| Message Index |
| Next page |
| Previous page |