Unchecked
Author |
Message |
copthesaint
![](http://compsci.ca/v3/uploads/user_avatars/15853548854c9c056fda48d.jpg)
|
Posted: Sun May 30, 2010 3:44 pm Post subject: Unchecked |
|
|
Description: OOT adds the concept of "unchecked" to Turing. Here, you can request that certain run time tests, which take place by default, can be eliminated. This makes the program more efficient at the risk of unreliability.
Im just wondering, since I have never came across this, what are the +itive and -itive sides of using unchecked in turing? |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
DemonWasp
|
Posted: Sun May 30, 2010 10:01 pm Post subject: RE:Unchecked |
|
|
Positive: you can skip array-out-of-bounds checks and the like, making your program faster.
Negative: if things don't work quite right, your program could segfault and just die instead of crashing like normal. |
|
|
|
|
![](images/spacer.gif) |
copthesaint
![](http://compsci.ca/v3/uploads/user_avatars/15853548854c9c056fda48d.jpg)
|
Posted: Mon May 31, 2010 9:06 am Post subject: RE:Unchecked |
|
|
Now when you say 'die' What do you mean? lol |
|
|
|
|
![](images/spacer.gif) |
DemonWasp
|
Posted: Mon May 31, 2010 11:10 am Post subject: RE:Unchecked |
|
|
When a program written in Turing crashes (well, when it generates an exception), the Turing IDE or built-in Turing interpreter in a "compiled" program will catch that exception, alert the user, and gracefully terminate the program, releasing file handles, network sockets, and so forth.
When an unchecked program written in Turing crashes, it could crash "hard", meaning it might leave file handles and sockets and so forth to be cleaned by the operating system. The program's run window would also disappear without a message to the user, unless the operating system chooses to display one. What's happening in this case is that the operating system has detected the fault instead of Turing, and has terminated the process. This isn't an acceptable way for a program to close, EVER. |
|
|
|
|
![](images/spacer.gif) |
copthesaint
![](http://compsci.ca/v3/uploads/user_avatars/15853548854c9c056fda48d.jpg)
|
Posted: Mon May 31, 2010 5:06 pm Post subject: RE:Unchecked |
|
|
ok, but using unchecked will make it faster right? ;p |
|
|
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
|
|
|
![](images/spacer.gif) |
DemonWasp
|
Posted: Mon May 31, 2010 9:44 pm Post subject: RE:Unchecked |
|
|
Making your program unchecked will make it (somewhat) faster.
You'd still be better off re-writing your program in pretty well any other language known to mankind - there's only one language I've ever seen be slower than Turing and that's a fixed problem now.
Seriously. Go learn Python, Java, C, C++, Perl, Ruby, HTML/Javascript or any other language ever. |
|
|
|
|
![](images/spacer.gif) |
|
|