I was just now installing Jobo's changes snippet for the first time into a low4 mud and came across an error saying END_MARKER undeclared. So I went into my dystopia copy and found out that END_MARKER is used as a macro for END… am I just missing something here or does this seem like the most foolish thing ever. A macro shouldn't be longer than what it points to should it? Is there some other reason it's done this way that I'm unaware of or am I right in thinking this is retarded?
ok, point isn't being used as a technical term here.
Wouldn't it make more sense to just use END instead of END_MARKER in functions since END is shorter? I'm failing to grasp this here, can someone explain it in a way that a self-taught coder can understand?
You mean #define END "END"? I don't think that would be particularly useful to be honest, if you're going to do that you might as well drop the #define completely and just use "END".
The main purpose of a symbolic constant is to improve readability, not to make the code shorter - otherwise you wouldn't bother writing "class = VAMPIRE" when you could just write it as "class = 1".
END_MARKER is also going to be easier to grep for than END, and should you later decide to change the value (eg if you wanted an actual command called "END") you'd only need to do it in one place, rather than having to go through the code looking for all instances.
The main purpose of a symbolic constant is to improve readability
And maintainability. It's a whole lot easier to change one constant from "END" to "FINISH" than it is to track down every (correct) occurrence of the string "END" in your code. You said this later in your post, but you also said that #define END "END" isn't useful but #define END_MARKER "END" would be. I think the latter is better as well, but the former is still better than using the literal "END".