News for hackers. Stuff that matters.
Re:A Plea for Lean Software (1995) [pdf] by jstimpfle on Wednesday August 05, 2020 @12:25PM (#24062597)
How are modules related to type safety?
Re:A Plea for Lean Software (1995) [pdf] by AnimalMuppet on Wednesday August 05, 2020 @01:48PM (#24063489)
Because, if you program in a type-safe language, if you call something that is compiled separately from you, you'd still like to maintain type safety across that call boundary.
Re:A Plea for Lean Software (1995) [pdf] by jstimpfle on Thursday August 06, 2020 @04:02PM (#24074852)
You absolutely get type safety across module boundaries with C in that if provider and user both compile against the same interface, this will be typesafe.

You could even have this type safety on the linker level as far as C is concerned. You just need an object file format that exports C types for symbols. This is not done on any of the (few) systems I know, and probably for practical reasons.

Some other languages give you this link time safety, but I assume at the cost of less interoperable object files.