Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

/prague/ Q&A

Name: Anonymous 2013-11-19 12:18

Ask /prog/ anything.

Although don't expect an answer or even a good one.

Also, keep it /prog/ related.

Name: Anonymous 2013-11-25 0:26

>>55
Dynamic typing is bad for the following reasons:

1. Some bugs that could be caught via static typing may not be caught at compilation time, and may turn up at run time. For some applications, failure at run time (that could have been prevented with more analysis) is not an option and this is not acceptable.

2. If the compiler is not able to determine the types of variables, the performance of the program may be degraded relative to how it would be if the compiler was given the set of types each variable could obtain explicitly. For some applications where high performance or minimal resource use is required, this extra overhead that could be prevented is not acceptable.

But if you are writing a quick script and think you a good enough coder to avoid bugs due to 1, and don't care about loss of performance due to 2, then dynamic typing can improve your productivity to an extent because you can just quickly write something up and not bother with type declarations. However, for large projects, type declarations serve as good documentation and type errors at compilation time will actually improve your productivity, as otherwise you'll be debugging type errors caught at runtime.

So in short, dynamic typing is good for shitty and short php scripts that no one cares about, and is bad for everything else.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List