3 ms·
The prerequisite for such a way of programming is to use plain universal interchangeable data structures. It does not seem possible in mainstream languages whe
by gluczywo 11y ago
The prerequisite for such a way of programming is to use plain universal interchangeable data structures.
It does not seem possible in mainstream languages where the OOP dogma tells you to obfuscate your sets, lists and maps and turn them into non-reusable classes.
- oleks 11y ago> The prerequisite for such a way of programming is to use plain universal interchangeable data structures. "Write programs to handle text streams, because that is a universal interface." - Doug Mcllroy I'm not sure it's a prerequisite though, "as long as the programmers know what they're doing" - as is often the case in Unix as well.
- maerF0x0 11y agoOr simply have a repo per language. That at least dedupes across each language (where there are often many projects reimplementing the same functions)
- gluczywo 11y agoWhat I meant is not incompatibility of basic types across languages but the tendency to create named classes where they are not needed. For example the OOP tells us to create UserList.java instead of using List<User> because it allows attach behavior and preserve encapsulation. Having 325 results for UserList.java in Krugle: http://opensearch.krugle.org/document/search/#query=userlist&language=Java http://opensearch.krugle.org/document/search/#query=userlist... I can't image how to create globally reusable function that has the list of users in the signature.
- maerF0x0 11y agoOh, interesting, thanks for clarifying.
- al2o3cr 11y agoFunny, given that a systems programmer would argue that the "FP dogma" has convinced you that "sets, lists and maps" are "plain data structures" with universally-applicable performance characteristics in terms of runtime and space. And you can't even use no-longer-relevant chunks of their memory as scratch!