Do you use strict conditions in your projects?

Do you use the parameter "strict off", "clear off"? Or there may be a "strict user" and some other options, such as an "Implicit type". Intended Object ',' Late Binding ',' Implicit Conversion '?

+3
source share
8 answers

Never. OPTIONS STRICT OFF is the same as OPTIONS BADPROGRAMMING ON.

OPTIONS STRICT OFF relaxes some of the checks that VB.NET does. It relaxes language rules. These rules should save you from yourself. Never let the tongue save you from yourself. This is especially true if you are starting from a more liberated environment, in which case there is a chance that you need to save.

One more note: most programming languages ​​do not have the right to speak: please let me shoot myself in the foot.

+13
source

Always develop in any language with full warnings and restrictions. No exceptions, ever.

Otherwise, this is a false economy, of course, it may seem that it works, but, of course, it will come back to bite you later.

( - PHP, "" , , ". , . , ?" )

+3

- Option Strict On , . , , Option Strict Off .

+2

Strict = On, , live, Explicit = On, .

+1

Strict ON

OFF, -

0

. . , vbscripts, . ,

0

Strict OFF, - , , .

"" , , , -, , Strict ON , , .

0

Option Strict Off Option Explicit Off False Economies .

You will spend more time chasing strange errors than it takes to write the error code and warnings first. My experience has taught me this.

The only exceptions are when I need to use late binding, in which case I have to disable it.

0
source

Source: https://habr.com/ru/post/1711578/


All Articles