6

I have always wondered this: The compiler knows that I need to have semicolon at the end of the line. It complains to me about is missing. Why can't it add that semicolon there by itself?? I mean, clearly it's the smarter one of us two. It knows all those language standards and is able to check them. I know jack shit. Still instead of helping me, it has to be a bitch and just nag.

Also, what's this business with "true" or "false"? How the hell should I know? Most of the time I am like "maybe". I want code like this:

if (myVar =~ true)
function1()
else sometimes
function2()
or maybe
function3()
or instead usually
function4()

if (error = true)
fix it

Comments
  • 7
    Let me be the first douche to tell you to use python
  • 7
    The "end of the line" is pretty irrelevant in C/C++, it's (mostly) just the same as space. You could as well have meant a comma instead of a semicolon.

    As for the rest, a computer doesn't have a maybe, and it doesn't know. It's your job as programmer to give a definition of maybe that is compatible with the determinstic, binary logic that computers work with. Fuzzy logic isn't a new concept, after all.

    Not to mention that it's an issue if you don't know because devs are exactly paid to know where most people don't know.
  • 4
    It's not about language standards. Probably the most important rule a complier has to follow is that it should under no circumstances do anything that changes the meaning of your program. Putting semicolons can change the meaning of your program. It's up to *you* to define the meaning.

    Besides, error checking is in the compiler's purview. Error correction isn't.

    Imagine what would happen otherwise - you wrote a program and the compiler silently "fixed" it. You have no clue what happened after that and the program could do anything. It would also make program analysis on the compiler side much much more difficult.

    You do have linters and stuff that check this and IDEs like Visual Studio and CLion automatically generate suggestions that you can choose to accept.
  • 0
    @Fast-Nop and that's why quantum computing is going to be fun
  • 0
    @TCPizza just shackle the quantum computers with enough blockchains.
  • 5
    The only reason python gets around this is because spacing and newlines are a critical part of its syntax. That's why I hate it.
  • 0
    @Fast-Nop Ok, now I understand. I didn't understand this previously, but now I do. Thanks. I was very silly and it's good that there are people to correct other people.
  • 0
    I think this cold and hostile world is lacking more humanistic programming language. Something that doesn't require you to explicitly describe what you want. Instead, it should live in symbiosis with the abstract feelings of the developer.
  • 0
    @irene drugs. A lot of them.
Add Comment