Please log in.
Before you can vote, you need to register. Please log in or create an account.
Computer: Programming Language
BEEYOTCH keyword   (+5, -7)  [vote for, against]
New C++ keyword: BEEOTCH!

Occasionally, in my software development, I encounter the problem of a command not executing properly. Usually, it's because some other process in the system is hogging the CPU cycles, but sometimes it's because a resource is being used by another application. For example, I've tried opening COM ports, only to receive an error from the OS indicating that the comport is in use by someone else.

It would be nice if there was a keyword in C++ that would permit a particular line of code to temporarily increase it's priority over everything else running in the system.

My suggestion is a keyword that would be appended to such lines of code. The tentative name for the keyword is "BEEYOTCH!".

So, say if you want to open a comport with no delay and 100% success, you would type:

FILE* f = fopen("com1", "rt"), BEEYOTCH! ;

Another advantage to this syntactical addition is that it would be easy to grep through the code for BEEYOTCH!'s, thus giving a better idea of where exactly the critical sections of the code are.
-- AntiQuark, Nov 01 2001

RespectMyAuthoritah()
-- phoenix, Nov 01 2001


What's wrong with:

cout << "If you want me to finish ever, please kill some processes. But not this one. Actually, you might as well kill me, coz I won't be done till Christmas anyhow.";

(Mmm, suicidal computer programmers are kind of the opposite of what you want.
-- pottedstu, Nov 01 2001


Is that an acronym? If so what does it stand for, if not wouldn't it be better to use an actual word?
-- sirrobin, Nov 02 2001


[sp: ... its prioritiy...; the spelling of your new keyword in the subtitle is different from the one in the text.]

[sirrobin], I figured this is a drawn out "bitch" (as if the programmer is trying to dominate the system), but it's something of a streyotch.

How do you get from the priority increase to 100% success rate?

A way of making programs always succeed is a WIBNI.
-- jutta, Nov 02 2001


If it is a drawn out "bitch" (a streeyotch indeed) wouldn't it be better to say "pleeayozze"?
-- sirrobin, Nov 07 2001


The Perl equivalent would be to add "or die trying" to the end of each statement.
-- pottedstu, Nov 07 2001


So the process that gets cut off by the BEEYOTCH! keyword would be "bitch-slapped"?
-- joetcochran, Apr 08 2002


AmigaOS had the lovely/evil Forbid()/Permit() pairs to do this... on the other hand, BeOS might be the best OS for this feature, given the naming similarity...
-- Jeremi, Apr 09 2002


Of course, you would want the program that was cut off by the BEEYOTCH! keyword to be able to handle this interruption, and maybe counter it with a different keyword, (pseudocode) e.g.,

try Open COM1; on BEEYOTCH! OH_NO_YOU_DIDNT!

Of course this could result in an endless loop of OH_NO_YOU_DIDNT! 's, but isn't that what happens on Jerry Springer anyway?
-- joetcochran, Apr 22 2002



random, halfbakery