[M3devel] Module Visibility

dirk muysers dmuysers at hotmail.com
Mon Jul 30 18:19:03 CEST 2018


I allways wondered why some "m3core" packages export even their private modules.
Normally, e.g. "Text8Short.New" is supposed to be called only by "Text8.New" and thus doesn't assert its precondition of being shorter than "MaxLength", but since the module is exported anybody can directly call "Text8Short" with very long arrays. Sure, in that case, its execution raises a range error, but still, the module should not be exported without an explicit assertion of its precondition, and why export it at all?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20180730/ff74e267/attachment-0001.html>


More information about the M3devel mailing list