
If the interface easily causes undefined behavior, it's a bad idea.Though never can be better if you haven't thought it through. The Zen of Python by Tim Peters, also know as PEP 20, is a collection of guiding principles designed into 20 aphorisms, only 19 of which were written. The Zen of Python is supposedly, by its literal description, the 'guiding principles' from Guido himself.
Although the cleanest, most maintainable way will not be obvious at first unless you read books and watch talks from a lot of really smart people. There will be many ways to do everything know their trade-offs and be an engineer and pick one!. In the face of ambiguity, don't compile. Unless their checking is statically enforced. That said, if you can't hide the rule breaking, a practical impure solution to a smaller problem is better than a pure impractical solution to the generic problem. Special cases will require breaking the rules, but try to keep the rule breaking hidden. Try entering import this in a Python prompt to view The Zen of Python. Written like a poem, it is extremely useful to describe such a vague concept. Readability is important so C++ being what it is, write lots of comments. import this The Zen of Python, by Tim Peters Beautiful is better than ugly. It typically refers to the principles laid out in The Zen of Python. Pointer chasing is better than double pointer chasing. Contiguous is better than pointer chasing. A complicated implementation is better than a complex interface. A simple implementation is better than a complicated one. Explicit is better than implicit, but bad defaults are worse than either. Not too ugly is better than really ugly. That said, here's my best attempt (blatant stylistic rip-off incoming, not to be taken too seriously):
In C++, a lot more things will come down to nitty gritty specifics. Theres a poem in Python - The Zen of Python, called. These guiding principles were first presented by Tim Peters, one of Python's founding contributors, in 1999. When you're working in a higher level language, you can just smooth over so many more edge cases and state more general principles. Aamir Shahzad Hashmi The Zen of Python is a set of golden principles or axioms for the best programming practices in Pythonic style. I don't know if there is one, or can meaningfully really be one.