Algorithms should be free from rich types

Hipreme msnmancini at hotmail.com
Wed Jun 28 17:12:17 UTC 2023


On Wednesday, 28 June 2023 at 17:00:44 UTC, Ali Çehreli wrote:
> On 6/28/23 02:25, Max Samukha wrote:
>
> > That's some poorly designed library (Phobos?).
>
> Not in the D world at all.
>
> Ironically, I think the library's design is actually pretty 
> good. And that's why I was motivated to write in the first 
> place: Everything was done according to industry best practices 
> but in the end all of that reduces the usability of the library.
>
> Ali

I have had a rant with `private` since the time I used LibGDX 
Particle System. I wasn't able to extend its particle system to 
add collision to it, why? Because the particles were `private`. 
Since that, I never used `private` anymore without a very very 
good reason to do so, the only place I use it right now is for 
intermediate processes on a full process. People in industry 
knows nothing on how to use `protected`. Protected IMO should be 
the industry standard.

I have worked in a codebase which is being refactored for at 
least 3 years, there's so many changes on `private` not being 
used after some time. Why is that? Because programmers should not 
fear themselves most of the time.


More information about the Digitalmars-d mailing list