Click here to Skip to main content
14,549,600 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
AnswerRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Richard Deeming18-May-20 1:28
mveRichard Deeming18-May-20 1:28 
AnswerRe: What's the Most Concise, Human-Understandable Practical Language? Pin
KateAshman17-May-20 21:57
MemberKateAshman17-May-20 21:57 
GeneralRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Member 798912217-May-20 22:48
MemberMember 798912217-May-20 22:48 
GeneralRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Richard Deeming18-May-20 1:33
mveRichard Deeming18-May-20 1:33 
GeneralRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Member 798912218-May-20 4:30
MemberMember 798912218-May-20 4:30 
GeneralRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Richard Deeming18-May-20 4:39
mveRichard Deeming18-May-20 4:39 
GeneralRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Member 798912218-May-20 20:59
MemberMember 798912218-May-20 20:59 
GeneralRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Richard Deeming18-May-20 23:40
mveRichard Deeming18-May-20 23:40 
Member 7989122 wrote:
This is just a way to make a block that is not a loop, not a conditional statement, not a function body, but just a sequence of smaller blocks put togeteher for some purpose
You can create a similar block in C# using braces. And if you're particularly masochistic, you can mimic the EXIT with a goto[^]. Smile | :)
ManySteps:
BEGIN
   Step1();
   IF PreparationWentWrong THEN EXIT ManySteps;
   Step2();
   IF Specialcondition THEN EXIT ManySteps;
   Step3();
END ManySteps;
{
    Step1();
    if (PreparationWentWrong) goto ExitManySteps;
    Step2();
    if (Specialcondition) goto ExitManySteps;
    Step3();
}
ExitManySteps:
But this example would probably be better handled with SEH - if something went wrong, you don't want to depend on the caller checking a return value, or some unrelated property.

Member 7989122 wrote:
When you say "Here comes a conditional block" by using an IF keyword, you should not need to use an open parenthesis to say that "here comes the condition".
That could potentially lead to ambiguity - which statement(s) are part of the condition, and which are part of the branch? Even if it's always obvious to the compiler, it may not always be obvious to the person reading the code. And the main point of any code is to be read and understood by a person.

Member 7989122 wrote:
That is a major flaw in the language "design".
No, it's a major difference in the language design. (And yes, the language was designed. No need for the sarcisti-quotes.)

English doesn't have accents on any letters; you're just supposed to know how to pronounce them. Does that makes the accents in other languages a flaw? Or is English the flawed language for not having them?

Just because something is different doesn't mean that it's flawed.

Member 7989122 wrote:
At the end of a deep nest, in C languages there may be a lisp-like sequence of closing parentheses, and you may have a hard time seeing which one closes the outermost loop, the while, the function, the class...
Thumbs Up | :thumbsup: Agreed. But code that's nested that deeply is crying out to be refactored anyway. Smile | :)



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

GeneralRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Member 798912219-May-20 6:55
MemberMember 798912219-May-20 6:55 
GeneralRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Richard Deeming19-May-20 7:31
mveRichard Deeming19-May-20 7:31 
AnswerRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Stuart Dootson18-May-20 0:59
professionalStuart Dootson18-May-20 0:59 
AnswerRe: What's the Most Concise, Human-Understandable Practical Language? Pin
BryanFazekas18-May-20 2:21
MemberBryanFazekas18-May-20 2:21 
AnswerRe: What's the Most Concise, Human-Understandable Practical Language? Pin
W Balboos, GHB18-May-20 2:35
mveW Balboos, GHB18-May-20 2:35 
AnswerRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Member 1181677618-May-20 3:47
MemberMember 1181677618-May-20 3:47 
AnswerRe: What's the Most Concise, Human-Understandable Practical Language? Pin
sasadler18-May-20 8:51
Membersasadler18-May-20 8:51 
AnswerRe: What's the Most Concise, Human-Understandable Practical Language? Pin
nedzadarek18-May-20 10:25
Membernedzadarek18-May-20 10:25 
AnswerRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Member 1085545518-May-20 13:45
MemberMember 1085545518-May-20 13:45 
AnswerRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Kirk 1038982118-May-20 14:56
MemberKirk 1038982118-May-20 14:56 
GeneralRe: What's the Most Concise, Human-Understandable Practical Language? Pin
nedzadarek19-May-20 3:55
Membernedzadarek19-May-20 3:55 
GeneralRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Member 798912219-May-20 6:15
MemberMember 798912219-May-20 6:15 
AnswerRe: What's the Most Concise, Human-Understandable Practical Language? Pin
GuyThiebaut19-May-20 0:36
professionalGuyThiebaut19-May-20 0:36 
Generalhtml button not firing on mobile, oh Pin
raddevus11-May-20 9:16
mvaraddevus11-May-20 9:16 
GeneralRe: html button not firing on mobile, oh Pin
Richard Deeming11-May-20 9:31
mveRichard Deeming11-May-20 9:31 
GeneralRe: html button not firing on mobile, oh Pin
raddevus11-May-20 9:39
mvaraddevus11-May-20 9:39 
GeneralRe: html button not firing on mobile, oh Pin
raddevus11-May-20 10:54
mvaraddevus11-May-20 10:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.