Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
Let me be the first douche to tell you to use python
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.
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.
TCPizza10674y@Fast-Nop and that's why quantum computing is going to be fun
@TCPizza just shackle the quantum computers with enough blockchains.
bahua134074yThe only reason python gets around this is because spacing and newlines are a critical part of its syntax. That's why I hate it.
thatDude5664y@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.
thatDude5664yI 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.
@irene drugs. A lot of them.
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)
or instead usually
if (error = true)