Code That Says Exactly What It Means

monkyyy crazymonkyyy at gmail.com
Tue Oct 28 23:58:35 UTC 2025


On Tuesday, 28 October 2025 at 23:15:36 UTC, Peter C wrote:
>
> Can you give me an example where it should ;-)

Everywhere: all the time. Kaps lib had one use of the private 
keyword he added on a whim for a week, I needed to go edit it out 
within 2 hours of downloading the new copy.

"Stop working" keywords can only make (overall) less code 
compile; I like to think compilers should try to compile code, by 
the little known philosophy of "you have ONE JOB" and "clankers 
lack an immortal soul and have no right to question me a divine 
being"

If a problem is naturally imperative; and thats all of io; you 
may mathematically be able to convert it to a something "pure" 
but the further you push the more it will look like Haskell 
telling you need to learn about monads to print hello world; you 
should just skip ahead on the path of "safety enlightenment" to 
full Haskell, look at a monad implementing the same bug you 
could've done in c-89 in less time, and return to embrace the 
chaos.


More information about the Digitalmars-d mailing list