Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Programming (http://www.go4expert.com/forums/programming-forum/)
-   -   Interesting ... (http://www.go4expert.com/forums/interesting-t8725/)

metahuman 9Feb2008 04:44

Interesting ...
 
Came across this while reading a paper: some programming languages allow the programmer to specify whether or not array bounds checking is performed at runtime.

Now I am confused whether this is a good idea or a bad one :worried: ..... kindly pool in your inputs people.....

shabbir 9Feb2008 10:38

Re: Interesting ...
 
Its one of the bad thing when managing the project. There are many programming languages where you don't even need to declare the variables and at the first use it gets declared and such things are the worst part of it when you tend to make spelling errors and new variables are automatically declared.

coderzone 9Feb2008 12:41

Re: Interesting ...
 
Its not all about disadvantages but definitely some advantages as well. I would vote for it as an advantage because I don't need to be a very correct in syntax to get off with the language and when I am confident I can definitely opt for forced varaiable declaration and array sizes.

shabbir 9Feb2008 12:55

Re: Interesting ...
 
But the other way to look at it is you are learning the wrong way from starting and then when you get into real projects you tend to apply the wrong things.

coderzone 9Feb2008 13:12

Re: Interesting ...
 
Quote:

Originally Posted by shabbir
But the other way to look at it is you are learning the wrong way from starting and then when you get into real projects you tend to apply the wrong things.

We start applying something.

Also about the array being expandable when you insert more elements you tend to focus on your logic rather than concentrating on how to go about perfecting the language you tend to perfect your own business logic.

shabbir 9Feb2008 13:14

Re: Interesting ...
 
Then you are leaving upto the compiler to go about optimizing your business logic. If you are not sure how many elements your business logic can have then its better to be using more flexible option then arrays.

coderzone 9Feb2008 13:16

Re: Interesting ...
 
If arrays is flexible option then whats the harm.

shabbir 9Feb2008 13:19

Re: Interesting ...
 
The harm is you don't have the option of limited input then. But if arrays is something which can take n input and then when needed more then it can be relocated or if you are not sure then you can use something like List where we have unlimited input serving both the purpose.

Safari 9Feb2008 13:23

Re: Interesting ...
 
Probably the argument can always continue but My vote goes for languages having strict in declaration.

metahuman 10Feb2008 01:46

Re: Interesting ...
 
Why is nobody considering the point of increased compilation and execution time in case of 'enabled array bounds cheking ? ' ..... can't we just say that it's good for debugging and fixing errors in the development phase and once the code goes into production the array bounds checking can be turned off ??


All times are GMT +5.5. The time now is 16:17.