|
From: | Moazin Khatri |
Subject: | Re: [ft-devel] [freetype2] hooks-via-module-property d94f52b: Use `FT_Property_Set' to set the hooks. One less API function. |
Date: | Tue, 20 Aug 2019 15:03:36 +0500 |
Abusing it to set pointer to code, Just Unacceptable.
On Fri, Jul 19, 2019 at 4:34 PM Moazin Khatri <address@hidden> wrote:Just want to express that this is very, *very*, /very/, VERY, bad.Thank you for pointing that out. However, ...The whole property API is a big anti-pattern that FreeType has adopted. Still, using it to set boolean, integer, or string values is justifiable.Please explain to me why it's an "anti-pattern"? What's wrong with the property API? What could be a better alternative? Just for my own understanding! :)It should go the other way around. You should explain what you gain by using this scheme instead of what's standard practice in the language we are dealing with (C).For all I see you are throwing out type safety and things that compiler and linker can check for, to gain.... nothing. "Fewer API" is not a goal. It shouldn't be. Why don't we move ALL API into that one call?!Also Google around why ioctl is a bad syscall for example.--behdad
http://behdad.org/
[Prev in Thread] | Current Thread | [Next in Thread] |