- Joined
- Sep 20, 2022
- Messages
- 348
- Reaction score
- 42
What would you do if you had to name something that has no word in the English language?
Lets say my first function takes a string as an argument, and returns a string. What it does is replaces all
My second function does the reverse. The purpose of the functions is to allow me to store multi-line text on a single line within a text file.
I have named them encode_esc and decode_esc, and that is ugly.
One school of thought suggests naming a function according to what it returns. There might be a word for this.
Times like this, I consider making a book of every programming concept I know, and giving them numbers.
Lets say my first function takes a string as an argument, and returns a string. What it does is replaces all
\ with \\ and all newlines with \n.My second function does the reverse. The purpose of the functions is to allow me to store multi-line text on a single line within a text file.
I have named them encode_esc and decode_esc, and that is ugly.
One school of thought suggests naming a function according to what it returns. There might be a word for this.
Times like this, I consider making a book of every programming concept I know, and giving them numbers.