|
Common Lisp's loop macro can be pretty interesting. It lets you do things like:
(loop for i in *random*
counting (evenp i) into evens
counting (oddp i) into odds
summing i into total
maximizing i into max
minimizing i into min
finally (return (list min max total evens odds)))
|
|
|
|
|
Bloody hell, nobody mentioned GOTO or even GOSUB. It may not be error handling bit it was/is almost as abused as RESUME NEXT.
There were some doozies in the Lotus 123 macro language as well but I can't remember them. And did you ever look under the hood of early Lotus Notes, now there was a whole collection of nightmares!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I actually used the MUMPS language when I did a contract for the VA. No reserved word, since everything was by context:
This was actually legal MUMPS code, since all things could be shortened to the first letter:
GREPTHIS()
N S,N,T,I,K,Q S I="K",S="11",K="l1",Q="R",T="K"
I I=T D T
Q:$Q Q Q
T I I,S&K S S=S+K Q
The full blown statements weren't much better:
GREPTHIS()
NEW SET,NEW,THEN,IF,KILL,QUIT SET IF="KILL",SET="11",KILL="l1",QUIT="RETURN",THEN="KILL"
IF IF=THEN DO THEN
QUIT:$QUIT QUIT QUIT ; (quit)
THEN IF IF,SET&KILL SET SET=SET+KILL QUIT
Just to put history behind it, MUMPS was the "Massachusetts General Hospital Utility Multi-Programming System", and (colloquially) was designed by doctors.
|
|
|
|
|
I'd say the If..Then..Else statement is pretty clear, amongst many many others.
If anything, your example is a little odd, as it really doesn't tell you what it is doing - resume next what? That's not English.
(It's also an extremely dodgy technique of error handling, equivalent of enclosing every statement in:
Exception error;
try {
statement;
}
catch (Exception ex) {
error = ex;
}
Which just invites people not to bother checking the result.
May as well have a statement like
On Error Keep Calm and Carry On
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
I still love plain old C#.
foreach(var exception in MyExceptionCollection)
try
throw exception;
catch()
continue;
|
|
|
|
|
The best bit about PERL (in fact the only good bit) is
On Error DIE
Is that why PERL programmers are becoming scarce?
We're philosophical about power outages here. A.C. come, A.C. go.
|
|
|
|
|
When I worked at CompuServe, a coworker wrote some code I was running a test harness on for connecting to the portal. His variable "IBHosed" showed up in the exception if the connection wasn't established.
|
|
|
|
|
|
See title
We can’t stop here, this is bat country - Hunter S Thompson RIP
|
|
|
|
|
It's all down to @Steve-Solomon - perhaps he didn't realize that winning the CCC yesterday means he has to post the next one which should have been today?
Either way, he is up tomorrow!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Would a Greek philosopher at Euro 2016 be Soccerates?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Do whales play winning football?
... such stuff as dreams are made on
|
|
|
|
|
No, I'm normally crap a football
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
They certainly scored more goals than England!
Philosophers Football[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
That deserves a cup!
(of hemlock)
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.
--Winston Churchill
|
|
|
|
|
If a god of war had educated Rob Schneider's daughter, would you say Ares taught Elle?
|
|
|
|
|
Dammit, I wanted to make a joke on that one
My 5.
You always obtain more by being rather polite and armed than polite only.
|
|
|
|
|
I imagine he'd be bored, unless he had enough Plato to amuse himself.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Too much Plato and he'd probably get a Hermias.
/ravi
|
|
|
|
|
Damis that would hurt!
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Yes, I'd be very Euphrates of doing that.
/ravi
|
|
|
|
|
If he got one, all the down time might turn him into a dangerous Pyrrho.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Only if he's not a Hippocrates.
GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++* Weapons extension: ma- k++ F+2 X
If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver
When I was six, there were no ones and zeroes - only zeroes. And not all of them worked. -- Ravi Bhavnani
|
|
|
|
|
They would like to, but they Kant
You always obtain more by being rather polite and armed than polite only.
|
|
|
|