str->str_pok |= SP_FBM; /* deep magic */ s = (unsigned char*)(str->str_ptr); /* deeper magic */
About this quote
- What does it mean?
- The code sets a flag on a string and then casts its pointer, describing both steps as 'deep magic'.
- In plain terms
- It marks the string and then treats its data as raw bytes, calling it magic.
- What can you take from it?
- Be explicit when manipulating low‑level string internals to avoid obscure code.
Where it applies
Putting it to work
Questions to consider
- What does the flag actually change?
- Can this be replaced with a clearer API?
Another view
Calling it magic hides the real purpose and can be error‑prone.
More from Larry Wall
echo 'Hmmm...you don't have Berkeley networking in libc.a...' echo 'but the Wollongong group seems to have hacked it in.
Permalink to quote #248 echo 'ICK, NOTHING WORKED!!! You may have to diddle the includes.';;
Permalink to quote #249 echo $package has manual pages available in source form. echo 'However, you don't have nroff, so they're probably useless to you.
Permalink to quote #250
Related quotes
Well, I think Perl should run faster than C. :-)
Larry WallLarry Wall quote #181 Perl should remain fast and intuitive (to the extent that it is :-)
Larry WallLarry Wall quote #187 Will the people in the cheaper seats clap your hands? And the rest of you, if you'll just rattle your jewelry.
John LennonJohn Lennon quote #1