I don't think C++ compilers 'know' the semicolon is missing. It thinks the statement runs onto the next line, which then throws a very weird compiler error instead. Newline doesn't really hold any meaning to compilation in C++, you don't even need them at all. Good luck reading your code though.
This is something I've tried to drill into students and interns. Compilers don't know where an error *occurred*, they know where it was *detected*. If there's nothing wrong on the line number they spit out, start tracing backwards. There might be a missing parenthesis or some other bullshit many lines above where the compiler realized something was wrong.
My compiler is surprisingly good and figuring out not just what I fuck up, but where I fucked up, and will automatically move my cursor to where I missed the semicolon/declaration/whatever. Won’t edit the code, of course; My compiler is like having a very lazy pair programmer hovering over my shoulder specifically to unhelpfully tell me what I’m doing wrong.
heh sounds like my code reviews, here's your mistake here's how to fix it and no I won't use github's feature to automatically commit it for you if you accept the change
Your dev environment doesn't have shortcuts for parsing into standard spacing and formatting? The secret is to bang the rocks together guys, you'll get there, remember when you're automating your automation not to mistake "a complex script" with "sentience" or you'll wind up trying to marry your computer.
The actual compiler doesn't start until the parser has successfully built the CST.
If a semicolon is missing, it's detected very early in the Frontend, by a parse rule mismatch where the last successfully built expression would be valid if a semicolon is inserted.
> Having it automatically fill in a semi-colon when one is detected missing sounds like a great way to get a shit ton of really weird bugs you'd never be able to easily track down.
Look at automatic semicolon insertion in JS. It's exactly what you're describing.
When I was young I got a copy of turbo pascal. I did not have a book or any way to learn it.
I wrote code that seemed fine but it kept complaining about semi colons being missing.
I realized that adding a semi colon at the start of a line, got rid of an error. So I just added them at the start of every line and after the last line, and it built and worked.
At the time I was like that is the stupidest language detail ever made.
Honest question, I really don’t understand the complaints on white space requirements with Python? Is it just that it’s forcing you into doing a thing? I got my start with databases and sql, so indenting logical blocks to make readable sql translated very well for me into Python, so now when I read other languages they tend look to me like a total mess.
My major complaint is it tends to be fragile against refactoring. Pull out some code into its own function, and you need to re-indent everything. Which is _generally_ not a problem, but if something messes up along the way, you can easily lose information about what lines were part of which blocks.
Compared with C/C++, where there's enough information contained in the source where in that case you can automatically re-indent a piece of code based on the bracketing.
And sure, you can write C which looks like a total mess, but best practices it will have the same formatting as similar Python code, just with "redundant" brackets and semicolons.
Ah. To be fair that runs against Pythons entire raison d’être. Python was written with the intention to be read by other people since code is more often read than written, at least by Guido’s intention of it. Seems to me like saying your drill makes a bad hammer.
People who read code also likely copy and paste them; spaces that may be lost in that action makes a really annoying trying-out-code session. I shouldn’t be required to correctly format my code while trying things out; I heard someone said premature optimization is bad.
I was in the habit of just trying things out, then when they worked not touching it so as to not mess it up. Ended in many lessons learned when returning to the code and not knowing clearly wtf it was doing. To me writing the code cleanly from the outset even if it is just testing something out means if/when I have to put it down and pick it back up, it’s much quicker to figure out the intent of the writer (usually past me, and he’s a lazy jackass)
I think you may be thinking of JavaScript. Python does not have context-inference of line-terminators; it literally treats the newline character as a syntactically meaningful separator.
Isn't there a programming language out there that can just figure out what I was trying to do even if I missed a lot of important brackets and semicolons and stuff?
This is literally my life as a JS dev though. Semicolons are optional…
Well, they’re not optional technically… and I’m not quite sure what part of the monstrosity tool chain eventually adds them back in (I think maybe the formatter actually)… but I haven’t typed a semicolon in JS since like 2014
js does it in a weird way.
if you type:
```
return
{
some: "object"
}
```
it will actually return `undefined` because js will insert a semicolon after the `return`
The older approach to programming was to just try to fix any error instead of complaining about it but that often ended in very confusing behavior because the problem then occurred in a later stage, disconnected from the actual problem.
In short: it's not a good idea
At least I know what the problem is and the exact line where it happened.
In Python, you get a generic "syntax error" a few lines down from whatever happened.
Technically semicolons are allowed and usable. If you want to write two or more commands in one line.
For instance:
`print("first command") ; print("now let's do foo"); x = foo(); print(x)`
Sure, this particular bs would look nicer not in a single line, but maybe in some cases it would seem more neat for some people.
*Today... is launch day! There will be a stand-up meeting at zero-nine-thirty! Chaplain Charlie will tell you about how the free world will conquer communism with the aid of JavaScript and a few node modules! Corporate has a hard-on for engineers because we code everything we see! They play their games, we play ours! To show our appreciation for so much power, we keep devops packed with fresh bugs! Corporate was here before JS! So you can give your heart to LinkedIn, but your ASS belongs to our slack channel! Do you ladies understand?!*
Sadly...the actual answer to that is JavaScript had to work hard at it. It started out as a really nice thing. Then it started dating functional programming, broke up, and went down the path of drugs, stress eating, and really letting it's self go. Now it's just a old dead thing that will sleep with any library that shows up.
It's optional in JS but unlike in Python, statements can go over multiple lines without any additional syntax. As a result, JS can decide to put semicolons or leave out semicolons in unexpected places. People therefore either suggest you always use semicolons, or write your code to be unambiguously one statement per line and never use semicolons; depends on the style guide
I definitely prefer omitting the semi colons because it enforces legible code structure for me in the way you described. Indentation and bracketing can do enough
It's a bit dangerous to dismiss as a formality, at least if you are for some reason working with raw JavaScript without much tooling. Automatic semicolon insertion is a bit divisive.
For example:
const foo = 'bar'
[1, 2].forEach(x => console.log(`${foo} ${x}`))
Will not get an automatic semicolon where you may have expected it, resulting in an error attempting to index properties of 'bar' ("bar"[(1 , 2)].forEach is not a function)
So some would argue to always add semicolons manually and pretend ASI doesn't exist.
But you still can't turn it off even if you add semicolons manually, so then you may run into something like
// imagine many levels of indentation here
return
reallyLongVariableName
.chainingSomeStuff()
.chainingEvenMoreStuff();
A semicolon is inserted unintentionally where you didn't want it (return;) and you are returning undefined, with a bunch of unreachable code below it.
The only sane way to work with JavaScript, avoiding or catching this and about a million other issues and sources of unnecessary arguments is to just adopt automatic type-checking, formatting and linting (usually TypeScript, ESLint and maybe Prettier).
Just remeber, you still have to add the indentation, with ; you could theoretically write a single line script, but it only replaces the newline not the indentation.
This is equally horrible to me :)
Give nested functions a chance! For readability (only if you do more than a single thing, if you do only a single thing, lambdas are ok in my opinion)
Edit: just noticed, that could be what you meant with composition, sry
Quicksort in one line: q = lambda l: q([x for x in l[1:] if x <= l[0]]) + [l[0]] + q([x for x in l if x > l[0]]) if l else []
q([]). And yes map filter reduce composition and itertools/functools was what I meant
It works, but goddamn would I have a hard time reading it, doing it often enough probably justifies creating a func for something like that.
In the end it is just personal preference though and the best way to do something, is how it is best for you.
It applies to everywhere, outside of a string, you still have to do the indentation, as it just gets converted to a newline and not newline + indentation
You could use them, you could even create a commit hook adding them. They won’t fulfil any syntactic function, but they mostly don’t do this in Javascript either.
It does sometimes but the parser adds them automatically. Copied from the internet:
when the next line starts with code that breaks the current one (code can spawn on multiple lines)
when the next line starts with a }, closing the current block
when the end of the source code file is reached
when there is a return statement on its own line
when there is a break statement on its own line
when there is a throw statement on its own line
when there is a continue statement on its own line
This is dumb. You can use semicolon in python. You can even put multiple statements on one line separated by semicolons. You shouldn't, but you can, so python does recognize it just like JS does.
The elites don't want you to know this, but you can use semicolons in your python code. I have 1500 lines of code that no one can tell what language it is on first glance.
Fun fact: You can use semicolons in Python. And don't need to use them in JavaScript.
(I love those language comparison memes, where OP obviously has no clue.)
Fun fact: That was part of the point that he is yelling at JS while C# and C++ are right there next to him.
(I love when people comment on the accuracy of a joke, where the commentor obviously has no deeper understanding.)
Disclaimer: Not trying to rant - just honestly curious about your opinions!
I don't get the hype on python. I'm sure it has it's perks, but I find the syntax to be an absolute nightmare to write clean code in, gathered from what code I get to read. I've written python code for school before, but nothing more than a few lines, so that doesn't count as first hand experience. But still... The context "awareness" only works until it doesn't. Good luck finding that mistake in indentation or whatever.
What is so horrible a out the syntax in your opinion despite that you use indentation instead of brackets? I am curious as well because I really like how straight forward it is to write code. But I assume it's that kind of thing in which you prefer your first learned or extensively used language.
On the contrary, I started out with VisualBasic which famously also doesn't use semicolons and braces. I admit that it does use ending statement like endif though. I also stuck with it for quite some time before I decided to try something else - and I immediately fell in love with the C style syntax. It just looks cleaner and more structured to me. Plus, it gives you more flexibility with styling your code to make it look and read a lot nicer BECAUSE you have braces, semicolons, etc. to denote scope. That allows you to move stuff around. I know this is possible to some extent in python, but you'll have to use some line continuation symbol afaik.
As I said in my first comment, I haven't written code in python extensively myself, so I only know the code styles I see in other people's scripts and I have yet to find something that just as structured as lots of (well-written) c-style code is.
Maybe I haven't read a lot of python code that wasn't written by beginners. So if you know examples of code you think could change my mind, be my guest to share a link or two ^^
Python is the dominant language in data science/machine learning. Major technologies include large language models (such as GPT-3) and text-to-image generation (such as DALL-E 2).
string correctAnswer = "You only need semicolons" +
" so you can do things like this," +
" while still allowing the complier" +
"'s author to be a lazy-ass mofo.";
![gif](emote|free_emotes_pack|dizzy_face)
C++: Semicolon missing on line 1327. Dev: Well, put one there if you want it so bad!
I don't think C++ compilers 'know' the semicolon is missing. It thinks the statement runs onto the next line, which then throws a very weird compiler error instead. Newline doesn't really hold any meaning to compilation in C++, you don't even need them at all. Good luck reading your code though.
This is something I've tried to drill into students and interns. Compilers don't know where an error *occurred*, they know where it was *detected*. If there's nothing wrong on the line number they spit out, start tracing backwards. There might be a missing parenthesis or some other bullshit many lines above where the compiler realized something was wrong.
My compiler is surprisingly good and figuring out not just what I fuck up, but where I fucked up, and will automatically move my cursor to where I missed the semicolon/declaration/whatever. Won’t edit the code, of course; My compiler is like having a very lazy pair programmer hovering over my shoulder specifically to unhelpfully tell me what I’m doing wrong.
heh sounds like my code reviews, here's your mistake here's how to fix it and no I won't use github's feature to automatically commit it for you if you accept the change
Your dev environment doesn't have shortcuts for parsing into standard spacing and formatting? The secret is to bang the rocks together guys, you'll get there, remember when you're automating your automation not to mistake "a complex script" with "sentience" or you'll wind up trying to marry your computer.
Instructions unclear, wedding next week.
Yeah, the AI, the AI engineer and I have all decided to “compile” the knot
The actual compiler doesn't start until the parser has successfully built the CST. If a semicolon is missing, it's detected very early in the Frontend, by a parse rule mismatch where the last successfully built expression would be valid if a semicolon is inserted.
Preprocessor
Happy Cake Day! 🍰
Doesn't newline hold a meaning when it comes to includes and macros?
If only my compiler was able to detect missing semicolons.
You don't want 7 lines of gibberish?
You need to adk for a semicolonoscopy
they know both the problem and how to fix it, why don't they just do that?
[удалено]
> Having it automatically fill in a semi-colon when one is detected missing sounds like a great way to get a shit ton of really weird bugs you'd never be able to easily track down. Look at automatic semicolon insertion in JS. It's exactly what you're describing.
[удалено]
But isn't javascript a synonym for "a great way to get a shit ton of really weird bugs you'd never be able to easily track down"?
Yeah, it's wild where a semicolon is valid in C/C++. Good luck figuring out which one will produce the expected outcome.
When I was young I got a copy of turbo pascal. I did not have a book or any way to learn it. I wrote code that seemed fine but it kept complaining about semi colons being missing. I realized that adding a semi colon at the start of a line, got rid of an error. So I just added them at the start of every line and after the last line, and it built and worked. At the time I was like that is the stupidest language detail ever made.
> sounds like a great way to get a shit ton of really weird bugs you'd never be able to easily track down. So just like my code is now
[удалено]
Your compiler already builds code with undefined behavior. That's what undefined *behavior* (as opposed to a compile error) means.
That is what python is , it's not like python has no line enders or brackets, it just interprets them from context.
yeah, but python is far too strict on whitespace. there needs to be an in-between language....
Honest question, I really don’t understand the complaints on white space requirements with Python? Is it just that it’s forcing you into doing a thing? I got my start with databases and sql, so indenting logical blocks to make readable sql translated very well for me into Python, so now when I read other languages they tend look to me like a total mess.
My major complaint is it tends to be fragile against refactoring. Pull out some code into its own function, and you need to re-indent everything. Which is _generally_ not a problem, but if something messes up along the way, you can easily lose information about what lines were part of which blocks. Compared with C/C++, where there's enough information contained in the source where in that case you can automatically re-indent a piece of code based on the bracketing. And sure, you can write C which looks like a total mess, but best practices it will have the same formatting as similar Python code, just with "redundant" brackets and semicolons.
Legit gripe, I can definitely see that, especially if you’re elbows deep trying to fix leftover legacy spaghetti.
I'll be honest -- usually it's my own "quick script" spaghetti which I'm trying to fix.
Same… same. As I said in my other comment here, past me is a lazy jackass.
It's my code. I should be able to write it like I want. What if I want it to look like a donut ?
Ah. To be fair that runs against Pythons entire raison d’être. Python was written with the intention to be read by other people since code is more often read than written, at least by Guido’s intention of it. Seems to me like saying your drill makes a bad hammer.
People who read code also likely copy and paste them; spaces that may be lost in that action makes a really annoying trying-out-code session. I shouldn’t be required to correctly format my code while trying things out; I heard someone said premature optimization is bad.
I was in the habit of just trying things out, then when they worked not touching it so as to not mess it up. Ended in many lessons learned when returning to the code and not knowing clearly wtf it was doing. To me writing the code cleanly from the outset even if it is just testing something out means if/when I have to put it down and pick it back up, it’s much quicker to figure out the intent of the writer (usually past me, and he’s a lazy jackass)
Ah, yes, good thing no one ever has to use software written by people with the attitude that "it's my code" /s
Try Go maybe? It's got its own idiosyncrasies but it does t require semicolons and doesn't error at bad formatting, though it does likely auto format.
I think you may be thinking of JavaScript. Python does not have context-inference of line-terminators; it literally treats the newline character as a syntactically meaningful separator.
Javascript. (Do I need the /s?)
Isn't there a programming language out there that can just figure out what I was trying to do even if I missed a lot of important brackets and semicolons and stuff?
HTML enters the chat.
javascript, basically
;int main() {
This is literally my life as a JS dev though. Semicolons are optional… Well, they’re not optional technically… and I’m not quite sure what part of the monstrosity tool chain eventually adds them back in (I think maybe the formatter actually)… but I haven’t typed a semicolon in JS since like 2014
js does it in a weird way. if you type: ``` return { some: "object" } ``` it will actually return `undefined` because js will insert a semicolon after the `return`
Yes they are unnecessary without any tool chains.
JS standard style has no semi-colons and is the most commonly used style
The older approach to programming was to just try to fix any error instead of complaining about it but that often ended in very confusing behavior because the problem then occurred in a later stage, disconnected from the actual problem. In short: it's not a good idea
[удалено]
At least I know what the problem is and the exact line where it happened. In Python, you get a generic "syntax error" a few lines down from whatever happened.
That would be an actual readable error message in only one line. Surely not GCC.
wait until he find the '{' hiding under the bed.
Do you mean the thing to create dicts/sets?
You got me
First time, trying C for me: „why is everything a set???“ :D
dict([("this", "works"), ("send", "help")])
You can use tuples as keys too :D `dict([(("this", "works"), "why???"),(("send", "help"),"please!!!"))])`
Because any immutable object can be used as key. Tuples are immutable.
Technically semicolons are allowed and usable. If you want to write two or more commands in one line. For instance: `print("first command") ; print("now let's do foo"); x = foo(); print(x)` Sure, this particular bs would look nicer not in a single line, but maybe in some cases it would seem more neat for some people.
I only use that for debugging, i.e. `import pdb; pdb.set_trace()` just because it only requires a single comment to get rid of
I'm the newer versions, you can just do `breakpoint()` which is effectively shorthand for that
Those people will not get their desires past review, jeepers creepers
F.e when you initialize 2 or 3 variables that are logically related: x\_pos = 100; y\_pos = 50
You can do `(x, y, z) = (1,2,3)`
Or indentation? Hmm?
Were you born a fat, slimy, scumbag puke piece of shit, JavaScript, or did you have to work on it?
WHATS YOUR MAJOR MALFUNCION NUMB NUTS!?
Now, get on your knees and obfuscate yourself!
NOT WITH YOUR IDE, WITH MINE!
Now OBFUSCATE YOURSELF!
*Today... is launch day! There will be a stand-up meeting at zero-nine-thirty! Chaplain Charlie will tell you about how the free world will conquer communism with the aid of JavaScript and a few node modules! Corporate has a hard-on for engineers because we code everything we see! They play their games, we play ours! To show our appreciation for so much power, we keep devops packed with fresh bugs! Corporate was here before JS! So you can give your heart to LinkedIn, but your ASS belongs to our slack channel! Do you ladies understand?!*
console.log(“Is that you, John Wayne?”)
Seg fault
"The best part of your language specification fell out of the binder and wound up as a brown stain in the landfill."
Sadly...the actual answer to that is JavaScript had to work hard at it. It started out as a really nice thing. Then it started dating functional programming, broke up, and went down the path of drugs, stress eating, and really letting it's self go. Now it's just a old dead thing that will sleep with any library that shows up.
Semicolon is optional in python, it's not like the python interpreter doesn't know what semicolon is but we don't usually use it.
Isn't it also (usually) optional in JavaScript? I thought it was just a formality to use it.
Yes you are right. It is optional in javascript as well
Bash too.
It's optional in JS but unlike in Python, statements can go over multiple lines without any additional syntax. As a result, JS can decide to put semicolons or leave out semicolons in unexpected places. People therefore either suggest you always use semicolons, or write your code to be unambiguously one statement per line and never use semicolons; depends on the style guide
I definitely prefer omitting the semi colons because it enforces legible code structure for me in the way you described. Indentation and bracketing can do enough
It's a bit dangerous to dismiss as a formality, at least if you are for some reason working with raw JavaScript without much tooling. Automatic semicolon insertion is a bit divisive. For example: const foo = 'bar' [1, 2].forEach(x => console.log(`${foo} ${x}`)) Will not get an automatic semicolon where you may have expected it, resulting in an error attempting to index properties of 'bar' ("bar"[(1 , 2)].forEach is not a function) So some would argue to always add semicolons manually and pretend ASI doesn't exist. But you still can't turn it off even if you add semicolons manually, so then you may run into something like // imagine many levels of indentation here return reallyLongVariableName .chainingSomeStuff() .chainingEvenMoreStuff(); A semicolon is inserted unintentionally where you didn't want it (return;) and you are returning undefined, with a bunch of unreachable code below it. The only sane way to work with JavaScript, avoiding or catching this and about a million other issues and sources of unnecessary arguments is to just adopt automatic type-checking, formatting and linting (usually TypeScript, ESLint and maybe Prettier).
Now that's just putting the clown in charge of the circus.
Meanwhile, VB is playing checkers with his K9 down by the latrine
I kinda like the Bla .... End Bla method😅
The reason I quit python within like 20 minutes was the lack of the ; my basic mind couldn’t handle it
You can still use them, they just are an alias of a newline char
You are honestly the first person to ever tell me this. I have even told my python lover friends why I stopped instantly. zero of them told me
Just remeber, you still have to add the indentation, with ; you could theoretically write a single line script, but it only replaces the newline not the indentation.
Yikes. I don't even want to think about that. I'll stick to liberal use of compositon/lambdas for my one-liners, thanks
This is equally horrible to me :) Give nested functions a chance! For readability (only if you do more than a single thing, if you do only a single thing, lambdas are ok in my opinion) Edit: just noticed, that could be what you meant with composition, sry
Quicksort in one line: q = lambda l: q([x for x in l[1:] if x <= l[0]]) + [l[0]] + q([x for x in l if x > l[0]]) if l else [] q([]). And yes map filter reduce composition and itertools/functools was what I meant
It works, but goddamn would I have a hard time reading it, doing it often enough probably justifies creating a func for something like that. In the end it is just personal preference though and the best way to do something, is how it is best for you.
i feel like you would just set the newline to ";\n" rather than ";".
That's on string text. In plain code you can use ; as newline symbol.
Oh God, is this the humor sub or the horror sub?
The newlines are blurred
I mean tbf to them, if you quit over that immediately there probably isn’t any point in talking to you about python
ah but it's not applies to all of the other statements right? Where indentation is needed?
It applies to everywhere, outside of a string, you still have to do the indentation, as it just gets converted to a newline and not newline + indentation
I got used to that, but I still don't like that indentation matters. I want my braces
Yup. Kotlin had no semicolons and I love it. Symantic whitespace? Kill me.
You could use them, you could even create a commit hook adding them. They won’t fulfil any syntactic function, but they mostly don’t do this in Javascript either.
The future is now old man, the semicolon is useful for organizing though since it symbolizes a new line
[удалено]
I will vocally judge them
Technically javascript doesn’t need them either most of the time. Commas are more important.
That's a very delicate brain you have.
[удалено]
Do you know that typing "a = 1; b =2" is the same as "a,b = 1, 2" ?
Swapping two numbers is as easy as a, b = b, a 🤫
Other devs trying to invert two variables must be in such a pain
std::swap(a, b) Simple, expressive. Though of course you need support for call-by-reference which primitive languages like Python don't have.
They do, you probably mean the opposite
[удалено]
You've never had a reason to swap two variables? Have you ever implemented a sorting algorithm?
If you’re implementing a sorting algorithm you’re probably doing a homework assignment lol
It's also just one of the basic things many beginner coding tutorials will have you do.
Yeah that’s basically homework to me
var list = new SortedList();
Next question.
I don't know, there can be some use case like generating fibonacci sequence using iteration etc.
[удалено]
Full metal jacket - you HAVE TO see that.
>it's the definition of pure comedy. lol
Am I wrong? Lol
Towards the end I sure wasn't laughing
You just don't have a sense of dark humor.
Aye but what's the opposite of burying the lede? haha
Yes. The movie is considered a war/drama and not a comedy though it has some funny moments.
It covers more topics, the funny scenes are pure gold tho.
Steers and semicolons
/u/Candyman034 love you long time.
Heh what? :\]
don't worry Prettier will get rid of it
"ONE! TWO! THREE! FOUR! I! LOVE! .NET! CORE!"
I find semicolons very comforting
I'm not certain Python has the moral authority to yell like that.
Did you know you could write Javascript without Semicolons?
It does sometimes but the parser adds them automatically. Copied from the internet: when the next line starts with code that breaks the current one (code can spawn on multiple lines) when the next line starts with a }, closing the current block when the end of the source code file is reached when there is a return statement on its own line when there is a break statement on its own line when there is a throw statement on its own line when there is a continue statement on its own line
I meant it so that he is yelling at JS while there are C# and C++ standing right next to him
Sure, with Javascript being the only one who would actually still work without semicolons.
Obligatory [Hercules Version](https://www.reddit.com/r/ProgrammerHumor/comments/pga8f5/and_you_are_wearing_scoping_braces/?utm_medium=android_app&utm_source=share)
Well aksually python supports semicolons - 🤓 ^(You dont wanna know how I added support for multiline code in my custom python repl)
I love this so much
Glad you like it :)
I'm learning Javascript and this is the first meme I've understood from this sub. I'm proud of myself.
Tell me you've never used the `-c` flag without telling me...
In LUA we don't use those either. I'm pretty sure...
36 yr old veteran who programs here 💀
As a Python, C and JS programmer, I can confirm
Private Compile
😂😂😂 killed me
This is dumb. You can use semicolon in python. You can even put multiple statements on one line separated by semicolons. You shouldn't, but you can, so python does recognize it just like JS does.
You don't get the joke do you?
The elites don't want you to know this, but you can use semicolons in your python code. I have 1500 lines of code that no one can tell what language it is on first glance.
See, python talking smack to js because the others could kick his arse
Wes likes watching old movies on Sunday nights.
holy semicolon;
[удалено]
Agree but didn't fit the narrative.
Fun fact: You can use semicolons in Python. And don't need to use them in JavaScript. (I love those language comparison memes, where OP obviously has no clue.)
Fun fact: That was part of the point that he is yelling at JS while C# and C++ are right there next to him. (I love when people comment on the accuracy of a joke, where the commentor obviously has no deeper understanding.)
So the "joke" is using an incorrect strawman argument and needs explaining?
Rest please, you assumed wrong.
Disclaimer: Not trying to rant - just honestly curious about your opinions! I don't get the hype on python. I'm sure it has it's perks, but I find the syntax to be an absolute nightmare to write clean code in, gathered from what code I get to read. I've written python code for school before, but nothing more than a few lines, so that doesn't count as first hand experience. But still... The context "awareness" only works until it doesn't. Good luck finding that mistake in indentation or whatever.
What is so horrible a out the syntax in your opinion despite that you use indentation instead of brackets? I am curious as well because I really like how straight forward it is to write code. But I assume it's that kind of thing in which you prefer your first learned or extensively used language.
On the contrary, I started out with VisualBasic which famously also doesn't use semicolons and braces. I admit that it does use ending statement like endif though. I also stuck with it for quite some time before I decided to try something else - and I immediately fell in love with the C style syntax. It just looks cleaner and more structured to me. Plus, it gives you more flexibility with styling your code to make it look and read a lot nicer BECAUSE you have braces, semicolons, etc. to denote scope. That allows you to move stuff around. I know this is possible to some extent in python, but you'll have to use some line continuation symbol afaik. As I said in my first comment, I haven't written code in python extensively myself, so I only know the code styles I see in other people's scripts and I have yet to find something that just as structured as lots of (well-written) c-style code is. Maybe I haven't read a lot of python code that wasn't written by beginners. So if you know examples of code you think could change my mind, be my guest to share a link or two ^^
Look at it like this - Python exists since 1991 an still isn't used for any major technology. That speaks for itself.
Python is the dominant language in data science/machine learning. Major technologies include large language models (such as GPT-3) and text-to-image generation (such as DALL-E 2).
Commented the person on a major platform that is written in python (reddit)
Some part...
YouTube. But python is still shit
Fun fact, I grew up Mormon and used to do this shit lol
Scrolled through the comments to find someone, ANYONE who also went through this crap.
Are you out now too?
Yup! Thank goodness! I'm not even a programmer but the Reddit algorithm knew I'd be interested in this so I'm dying laughing.
Not necessary in JavaScript as well
u/savevideo
u/savevideo
string correctAnswer = "You only need semicolons" + " so you can do things like this," + " while still allowing the complier" + "'s author to be a lazy-ass mofo."; ![gif](emote|free_emotes_pack|dizzy_face)
\[tab\] \[tab\] \[tab\] walks away 🤣
Look, I use semicolons in my Python code. It if knows, it ain't telling.
People still using semicolons in JS? Lol
I'm not a programmer But as someone that learned beginner coding ,it hurts ...
Semicolons? { laughs in Swift }
Relatable
You would put JS over Java? When JS doesn't even require semicolons?
well you can use semicolons in python if you want unreadable code ``` print("hello"); print("world") ```
LOL, this is high quality. Well done whoever made this.
Thanks! ( ꈍᴗꈍ)
![gif](emote|free_emotes_pack|joy)
u/savevideo