Upcoming ACCU 2024 Talk: How DLang Improves my Modern C++ and Vice Versa

Kagamin spam at here.lot
Tue Apr 16 11:33:37 UTC 2024


My favorite example is glibc implementation of `putenv` function: 
it first finds the '=' character and takes a temporary slice of 
the variable name and then employs a tortured null terminated 
string cope trying to allocate a string with alloca or malloc, 
then copies the slice there and passes the resulting null 
terminated string to common `setenv` implementation, then 
cleanups the allocated string. And there I thought: "ugh, dude, 
what are you doing, just pass the slice as is".


More information about the Digitalmars-d-announce mailing list