3 ms·
It takes 10 sec to google "str_replace" and have the params presented to you. Using a manual is an integral part of development. I don't think there's many peop
by stef25 7y ago
It takes 10 sec to google "str_replace" and have the params presented to you. Using a manual is an integral part of development. I don't think there's many people who can memorize all the methods and their params, including optional ones, nor should they.
- cultus 7y agoThat sounds like it takes a lot more time and mental energy than if the API were consistent.
- Piskvorrr 7y agoWe have machines to do that for us. As in, "press Ctrl+Q, IDE shows relevant help." I don't value encyclopedic knowledge of every API out there any more...especially since those I do recall are of rather, um, limited use nowadays. Like with any language, the point isn't to cram a dictionary into your brain, it's to communicate.
- mantap 7y agoIt's a red flag if the basic operations (like string and array functions) are so inconsistent and weird so as to require use of an IDE or constant use of the docs.
- innocenat 7y agoBack in the day everyone has the PHP manual downloaded in CHM format (that was before broadband was common). Searching in CHM was just 1.5 seconds away.
- dep_b 7y agoStrongly typed languages have better autocomplete since ages, so in Java you would simply type "Str" in Netbeans and you would get all of the ways to create a String or StringBuilder including the parameters right at your fingertip without context switch. No memorizing except the vague notion of "sometimes you want to use a StringBuilder instead of String". Just keep typing code.
- slikts 7y agoYou mean statically, not strongly typed. Strong typing roughly means avoiding implicit type coercion.
- out_of_protocol 7y ago10 sec every single damn time, for like 4 years, until i switched to other language (ruby). And like google once or twice to remember params in %sanelanguage%