in reply to Re^10: Making a variable in a sub retain its value between calls
in thread Making a variable in a sub retain its value between calls
If INIT blocks are so evil, why is the Camel giving such advice?
The other day, I listed a few methods to start a child process. Should the user randomly pick one of the methods I listed? No. Each item in my list has its own features and quirks. For example, system 1, ... only works on Windows, and fork is broken on Windows.
If Camel's reader doesn't know the difference between BEGIN and INIT, he should look it up. That brings us to your previous question:
But I'd like to remark that from your response and ihb's, you apparently consider INIT blocks to be at best useless, at worst harmful, and certainly misnamed (i.e. not suitable for initialization). Do you have any use for them?
No. I didn't say INIT should not be used. All I said is that INIT should be used only after consideration, since it's broken. INIT blocks should not be used without thought as you say you do.
|
|---|