Soft Works (12020-06-26):
> Isn't it a clear benefit to have a named constant where the name
> of the constant indicates a meaning while a plain number does not?

No. If you know the API enough to use it properly, then the meaning of 1
is obvious. If you don't, the meaning of the constant is obscure.

"Avoid magic constants" is not an absolute commandment to apply with
dogmatism, it is a rule of thumb to apply with intelligence. Like the
ban of gotos.

If this was new code, then maybe it would be slightly better to use the
named constant. But so slightly that the time you wasted just writing
this mail is enough to nullify it. And this is not new code.

Seriously, stop wasting time on useless pseudo-cosmetic changes.
Building ffmpeg.c produces a full page of warnings. These are a few
orders of magnitude more annoying than a magic 1.

Regards,

-- 
  Nicolas George

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to