Scripting languages are only for advanced programmers
Why do people believe scripting languages are suitable for beginners to programming? This may be the way they were designed, but they end up having the opposite effect.
Essentially I think scripting languages are like languages for experts - like when you can play the piano and get a really hard piece to play, to show off how good you are. In programming, if you can already write bug free code using a normal language, but why not try the same thing using a scripting language? If you can do it, it shows your intellectual dexterity and cleverness (although the result would in that case be the same, i.e. a working program, and in the case you failed, it would be a less-working program).
Look at the following: http://at2.php.net/manual/en
I understand that “warning” completely. Essentially this function returns zero to indicate the string occurs at position zero and false to indicate the string does not occur in the text. But they are both the same if compared with the php == operator. And for that reason there is a === operator, called “exactly equals”, which also tests the type of the thing being compared. In the case of ===, not (0 === false).
I mean this is not simple stuff. Nor is it abstracting away from the details of programming.
How is this in any way better, or simpler, than:
- C which returns -1 if the item is not found?
- Java which
- gives a compile error if you try and compare false to 0,
- and also returns -1 if the item is not found
- A hypothetical language which threw a SubstringNotFoundException, which gave a compile error if not checked or thrown?
Scripting languages should just be banned in my opinion.