Originally Posted By: argv0
What you don't seem to realize is that your suggested identifiers do *not* eliminate all hardcoding in all cases, only in the specific scenario you brought up.

'Eliminate all hardcoding in all cases' is an ideal situation.
What do you state here then: that my suggestion is not good because it wouldn't achieve the ideal situation.
Should I help you realize what you do here?
It's like stating that buckets shouldnt be there because the availability of buckets doesn't guarantee that the fire gets suppressed.
Look at the non-sense level you exhibit here.
Because a proposal makes a sitation 'only' better, and not 'ideal', the proposal should be digged.

Also, be free to call any situation you want 'specific', lol.
If you bang on my door yelling that your house is on fire, I'll say "sorry your situation is too specific" and I'll slam the door in closed position.

Originally Posted By: argv0

If you pay attention to the example that you conveniently omitted in my quote,

Oh sorry!
Did I?
That's very possible!
I quoted what I said earlier in the hope to bring you on the path of the things I DID say.

Originally Posted By: argv0

you would notice that you would need a 3rd level indirection of callee to implement it, making your suggestion limited only to examples you personally use (your code is not how I would implement error handling at all and those proposed identifiers would be completely useless to me).

Hey!
Don't panic!
In case Mister Khaled would add my proposal(s)...
... I won't force you to use them!
I let you the freedom to do the things like you want them to do!
Nice of me, isn't it?

Originally Posted By: argv0

You also have yet to address the fact that "hardcoding" is really not as serious an inconvenience as you suggest it is. In fact as I've pointed out, you only type the name once per alias-- that's exactly once more than you normally would (the "alias MYNAME" declaration) instead of the one more time you would otherwise type $calias. This, again, is only limited to aliases, and then further limited to those exposed to your users, making it, imho, a small subset of any real-world script. In fact, I bet the total word count of your posts greatly exceeds the number of times all of your hardcoded alias names appear in all of your scripts.

The critic that my suggestion is ONLY limited to aliases.
What a drawback!
I'm too specific again!
The scripts that use aliases are RARE?

And then, you limit the application range even further (wow!), only aliases EXPOSED to users of MY script?
"A SMALL SUB-set", etcetera.

This is a bunch wet-thumb-using-pseudo-argumentation.

I see benefit of what I suggested.
Of course.
Otherwise I wouldn't suggest it.
While working further on a script, I regularly realize that I'm writing something that is similar to code written earlier.
Then I look and compare.
Then I either add a new alias with the common code + pass the differences as parameters, either just copy the earlier written code and edit it according to the new place.
The more is hardcoded, the more editing work I have on the new place.
My suggestion is comparable to a situation where $sockname in a socket event isn't available, inflicting me to hardcode it, inflicting me to edit it when I copy the code elsewhere.
Now, with $sockname, I can do:
if ($sockerr) { echo -s $sock($sockname).wsmsg | return }
Without $sockname, I have to do:
if ($sockerr) { echo -s $sock(mysocketname).wsmsg | return }
The first I can copy to another socket event without any edit.
The latter needs an edit of mysocketname.

That's why.
Is this new to you?
No.
I said it earlier.
You 'reacted' on a customized version of it (thus on yourself).
Then I gave an example.
And again you customized it first then react (my alias suddenly called another alias).
In short, you insert problems yourself, then insinuate they're mine by pretending to 'react' on me.

Originally Posted By: argv0

You have also yet to address the fact that this really hides the underlying issue here, which is error checking. This is my major concern. Error checking seems to be the only usage you have for such an alias, or at least I can personally think of no other serious uses for the current alias name. If you have another example, please share. Otherwise, if your suggestion for $calias is only to make the one use case of error checking better, there are better ways to do that. Better ways that do not include hacking on an extra alias that only makes dealing with errors marginally better in the one use case where you need to /echo the alias name out to a user.

Look again at the pseudo argumentation.
'no serious use'
'too specific ('one' in italic)
'marginally better'.
Lol.