logoalt Hacker News

teunispeters • today at 4:04 AM • 1 reply • view on HN

I like to declare that industry coding standards such as MISRA exist precisely because code bases like OpenSSL (specifically) exist, as it's such a good example of breaking every sensible rule in the standards.


Replies

rcxdude • today at 6:53 PM

MISRA's not great itself, though. Half of it is obvious and could be summarised as 'don't invoke undefined behaviour' a quarter is rules to get around absolutely terrible ancient compiler problems, and a quarter are arbitrary restrictions that don't really help improve code quality much. For example, the interface of this function wouldn't break any MISRA rules in a way that would force it to be any better.