3 ms·
what is the reason behind inconsistencies like !PackageInstalled => InstallPackage but AppendIfMissing? Why not InstallIfMissing? Or !LinePresent => AddLine? i
by keymone 14y ago
what is the reason behind inconsistencies like !PackageInstalled => InstallPackage but AppendIfMissing? Why not InstallIfMissing? Or !LinePresent => AddLine?
i don't care about the language you use but if your API/DSL is so inconsistent even in such a brief example i fear any large installation will be a maintenance hell.
- stevekemp 14y agoSeveral of the primitives were directly inspired by CFEngine 2.x, these include "AppendIfMissing" and "CommentLinesMatching". On that basis the names were kept to ease migration(s). I choose to believe the current additional primitives make sense as-is, so there inconsistency isn't so glaring. Whether that is true of course is a matter of familiarity.