3 ms·
Language-enforced association with methods and functions makes it possible to have full encapsulation in a way that's guaranteed by the language itself. That's
by zozbot234 7y ago
Language-enforced association with methods and functions makes it possible to have full encapsulation in a way that's guaranteed by the language itself. That's not even OO either, just simple object-based code. You even see these same ideas entering FP nowadays, with things like univalent types that enable one to establish equivalent types as "equal", and thus fully interchangeable, no matter how they're structured internally.
- Jtsummers 7y agoYes, this is true. I'm not arguing that procedural (in the C-style) is fantastic, but it can be scaled decently well, but requires discipline. There are definitely improvements to be had when you start adding other language features that enforce certain things.
- zozbot234 7y agoThe whole problem with "discipline" is that it's hard to write it down and enforce it in a large-scale project. Language-based mechanisms are inherently scalable (at least if properly designed; and arguably e.g. implementation inheritance isn't) and make it much easier to build software "in the large".
- walshemj 7y agoHow large a team I have certainly worked on large scale projects using procedural languages and I don't recall any problems with the required discipline