freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] [freetype2] hooks-via-module-property d94f52b: Use `FT_Pr


From: Behdad Esfahbod
Subject: Re: [ft-devel] [freetype2] hooks-via-module-property d94f52b: Use `FT_Property_Set' to set the hooks. One less API function.
Date: Mon, 19 Aug 2019 11:46:56 -0700

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/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]