|
Posted by Oli Filth on 10/25/05 04:53
Andrew DeFaria said the following on 25/10/2005 02:23:
> Oli Filth wrote:
>
>> Andrew DeFaria said the following on 24/10/2005 22:15:
>>
>>> Oli Filth wrote:
>>>
>>>>
>>>> Where's the benefit in having to remember the exact syntax for
>>>> hundreds/thousands of functions?
>>>
>>> Of what benefit is there to be using functions that you don't know
>>> intimately?!?
>>
>> Sure, you should know what they do and what you're trying to achieve
>> by using them, but knowing whether it's xml_parser_create() or
>> XmlParserCreate() or xmlParserCreate() (or equally, whether it's
>> strstr($needle, $haystack) or strstr($haystack, $needle)) is nothing
>> but an exercise in trivia.
>
> No, to me it's a sign that you don't know the function well enough...
I repeat my original point - where's the benefit in learning the precise
syntax for thousands of functions, especially custom functions that may
not be documented, or unfamiliar libraries?
It doesn't make one a better programmer (in the sense of understanding
how to design and construct functional, elegant programs and code), and
is error-prone (in the sense that you have to wait until run-time to
spot your mistakes that would otherwise have been picked up by syntax
highlighting, or wouldn't have been there in the first place due to
autocompletion).
Just because, for a trivial example, I can't remember whether it's
imagejpeg($source, $filename, $quality) or imagejpeg($filename,
$quality, $source) has no bearing on my understanding of what that
function does or why I want to use it...
Don't get me wrong though, if someone finds writing code easier in
TextPad (or whatever) easier, then I'm not going to dispute that. I just
find it a little tricky to understand.
>> Unfortunately, most APIs are necessarily complex...
>
> I would agree! Except, of course, for the usage of the word
> "necessarily". For that word I would substitute the word "unnecessarily".
Depends. Larger APIs ultimately afford you greater flexibility. You
probably couldn't shrink, for example, the Windows or Java APIs without
losing functionality and/or flexibility.
>>> Assembler would be quicker! Running that is. And yes some people
>>> still program in assembler. http://grc.com/smgassembly.htm
>>
>> Yup, I still do too ;) But only for embedded stuff.
>
> Well if you read the page you would see he write *all* of his
> applications in assembly...
Yeah, I noticed that. IMO, that's a pointless waste of time, unless he's
doing it purely for the academic exercise. :)
--
Oli
Navigation:
[Reply to this message]
|