Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Unchecked
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
copthesaint




PostPosted: 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?
Sponsor
Sponsor
Sponsor
sponsor
DemonWasp




PostPosted: 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.
copthesaint




PostPosted: Mon May 31, 2010 9:06 am   Post subject: RE:Unchecked

Now when you say 'die' What do you mean? lol
DemonWasp




PostPosted: 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.
copthesaint




PostPosted: Mon May 31, 2010 5:06 pm   Post subject: RE:Unchecked

ok, but using unchecked will make it faster right? ;p
Tony




PostPosted: Mon May 31, 2010 6:45 pm   Post subject: RE:Unchecked

That's not something you'd need to worry about with Turing Wink
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
DemonWasp




PostPosted: 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.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 7 Posts ]
Jump to:   


Style:  
Search: