Interesting ...

metahuman's Avatar, Join Date: Feb 2008
Newbie Member
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 ..... kindly pool in your inputs people.....
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
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.
0
coderzone's Avatar, Join Date: Jul 2004
Team Leader
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.
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
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.
0
coderzone's Avatar, Join Date: Jul 2004
Team Leader
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.
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
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.
0
coderzone's Avatar, Join Date: Jul 2004
Team Leader
If arrays is flexible option then whats the harm.
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
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.
0
Safari's Avatar, Join Date: Oct 2007
Ambitious contributor
Probably the argument can always continue but My vote goes for languages having strict in declaration.
0
metahuman's Avatar, Join Date: Feb 2008
Newbie Member
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 ??