ID:135124
 
Detailed Problem Description:

The DM ref entry for call() contains usr abuse.

Code Snippet to Reproduce Problem:

mob
proc
Proc1(Arg)
usr << "Proc1([Arg])"
Proc2(Arg)
usr << "Proc2([Arg])"
verb
call_proc(Proc in list("Proc1","Proc2"))
call(src,Proc)("Hello, world!")


Ungh!
I'm not sure if that constitutes as usr abuse since it uses it correctly (assuming they intended the mob who used the verb to see the result).
Who moved this to BYOND Features? The Forum Help clearly states that "Anything that does not function as it properly should in the documentation is a bug".

Anyway, I found another instance of usr abuse in the DM ref entry for atom.verbs:

mob/proc/kazaam()
usr << "Kazaam!"

mob/verb/add_kazaam()
verbs += /mob/proc/kazaam
mob/verb/remove_kazaam()
verbs -= /mob/proc/kazaam


Of course, in that case, they're using kazaam() as a verb, so its incorrectness is arguable, but if it were ever to be called as a proc, then, of course, it would, in all probability, say "Kazaam!" to the wrong player. In general, I don't think that something like this, when it could be so easily replaced with src, should exist, even if it would work within the tiny scope of the example.
In response to YMIHere
YMIHere wrote:
I'm not sure if that constitutes as usr abuse since it uses it correctly (assuming they intended the mob who used the verb to see the result).

In general, I don't think that something like this, when it could be so easily replaced with src, should exist, even if it would work within the tiny scope of the example.

In this situation, of course, usr would be passed down as desiered in this example, but if developers are supposed to be learning from this, then I don't think they should be taught to rely on that. Then, when they make a DeathCheck() proc that relies on the usr being passed down from their Attack() verb in order to identify the killer, they can say "The DM Ref made me do it!". It may work, but it's very brittle: if DeathCheck() were called in the wrong place, then it could totally fail!
In response to Wizkidd0123
You know what would be really cool? If people could just read what usr is in the reference rather than just using it because they don't know how to send arguments to a proc. =)

I doubt that will be happening anytime soon, so I guess you have a point there. =P
In response to Wizkidd0123
I wouldn't call it abuse, since there's nothing wrong with it. But if you're suggesting that the Reference should refer to src when situations like this come up, then I'd agree with you. Using usr in procs isn't the problem, its the newbies who think usr means what src does thats the problem, and using usr where src would apply doesn't help that problem any.
In response to Foomer
Foomer wrote:
I wouldn't call it abuse, since there's nothing wrong with it.

Agreed. I probably overstated that.

Using usr in procs isn't the problem, its the newbies who think usr means what src does thats the problem, and using usr where src would apply doesn't help that problem any.

Although, in my opinion, it's better practice to use src instead of usr when both would apply, it generally doesn't matter in a verb (Unless, of course, you call it manually). I think that the reference "error" is a step above this on the usr abuse scale, because in that case, if Proc1() or Proc2() are procs, which, in general, are meant to be manually called.

Of course, they are being used as verbs in the example, but I think that the usr use there can easily lead to bad habits among beginners, and that when it's so easy to change those "usr"s into "src"s, then why not do it?
In response to Wizkidd0123
I think the Guide could use an appendix on what the difference between usr and src is, and how they should be used. (And the Guide has the same usr/src problems as the Reference, can't seem to decide which one it wants to use.) But I think I suggested it before: If you don't like it, fix it! And send the results to someone who can do something about it.
In response to Foomer
Foomer wrote:
But I think I suggested it before: If you don't like it, fix it! And send the results to someone who can do something about it.

If I had the .html files for both the DM Ref and the Blue Book, then I would be glad to do that. However, I don't, so I can't.
In response to Wizkidd0123
Right Click -> Save Page As.

Or at least, thats how it works in FireFox. I know IE has something similar somewhere. (In the File Menu at least...)
In response to Foomer
Foomer wrote:
Right Click -> Save Page As.

Or at least, thats how it works in FireFox. I know IE has something similar somewhere. (In the File Menu at least...)

I had no idea =P!

*Goes to work*
In response to Wizkidd0123
The verbs case is clearly not usr abuse, since the proc is being used as a verb.

As for call(), looking at that I don't think I agree that's usr abuse either. Each proc is being called directly by a verb, which indicates verbish usage. The verb is doing nothing but calling that other proc, signaling that the proc is actually the workhorse.

Lummox JR
In response to Lummox JR
I agree with you on all of those points Lummox: I definately over-stated it.

Still, I think that it would be much nicer to, in the DM Ref, go with src when either would be applicable.
In response to Wizkidd0123
Wizkidd0123 wrote:
I agree with you on all of those points Lummox: I definately over-stated it.

Still, I think that it would be much nicer to, in the DM Ref, go with src when either would be applicable.

Given the verbish usage in both of those I really think usr is the better choice. If it was something like Login() I'd be inclined to do something different.

Lummox JR