[fpc-devel] Minor debate with ISO standard on case blocks

thaddy thaddy at localhost
Tue Jul 30 11:26:58 CEST 2019


On 2019-07-30 11:18, J. Gareth Moreton wrote:
> Yeah, I don't find that description clear either.  One shouldn't have
> to be a lawyer in order to decrypt such standards!
> 
> Of course, FPC can follow its own standard, but it should be one that
> everyone agrees on.  While I think we shouldn't live in the shadow of
> Delphi or be jammed in the realm of backwards compatibility, I'm a bit
> wary if there are quirks or errors that might otherwise cause people
> to back away from FPC rather than adapt their code to conform to it.
> 
> But just from a practicality point of view, I think a run-time error
> is better in this instance because you may be able to justify a
> particular input value not being possible, and so not need to add code
> for it in your case block, but if such a value ends up reaching the
> case block anyway, then you deserve to endure a run-time error because
> it means you haven't covered it properly.
> 
> Speaking of books and documentation, what's out there for Free Pascal
> in particular?
> 
> Gareth aka. Kit
> 
> P.S. I like to think my own design specs are a lot clearer than that 
> ISO!

Efforts to try and be exact often fail.
Natural language is way to expressive for human beings to achieve 
exactness.
Otherwise we would have a compiler for it ;)


More information about the fpc-devel mailing list