|
Posted by lawrence k on 09/02/06 23:43
Jerry Stuckle wrote:
> lawrence k wrote:
> > I've made it habit to check all returns in my code, and usually, on
> > most projects, I'll have an error function that reports error messages
> > to some central location. I recently worked on a project where someone
> > suggested to me I was spending too much time writing error messages,
> > and that I was therefore missing the benefit of using a scripting
> > language. The idea, apparently, is that the PHP interpreter writes all
> > the error messages that are needed, and that I shouldn't write such
> > code myself. I was given the impression that if I needed extensive
> > error checking, or strict typing, then I should use a real language,
> > like Java, but if I'm going to use a scripting language like PHP or
> > Ruby, then I should leave errors to the interpreter, since the whole
> > point of using scripting languages is speed of development. Has anyone
> > else heard this argument, and do you agree with it? I'm wondering how
> > other PHP programmers handle error messages. Check everything or leave
> > it to the PHP interpreter to tell you when there is an error?
> >
>
> Obviously either someone who was entirely clueless or a very sloppy
> programmer. In either case there is no way I would want to work with
> anyone with that attitude.
Actually the fellow (whom I took the project over from) is well
regarded in the town I live. He is mostly a C programmer. He's
apparently done quite a few projects (in C) that were quite successful.
Myself and a co-worker wondered if his PHP work was merely an
expression of haste, or design. From conversation, I was given the
sense the answer was "design". But I lost time figuring out his code,
and I feel that some comments would have done a lot to speed my
comprehension. I write error checks to make life easier for the next
programmer.
Navigation:
[Reply to this message]
|