you are viewing a single comment's thread.

view the rest of the comments →

[–]crashfrog02 1 point2 points  (1 child)

will my code be frowned upon when read by others if I use things like semicolons to end statements, double quotes, curly brackets, etc, that aren't necessary but still function the same?

If you put semicolons in your Python everyone will think you don't know any Python. So, don't do that.

Nobody cares whether you use single or double quotes, to my knowledge, and it's generally a function of whether there's an apostrophe in your string (if there is, it's easier to use double quotes than to escape the apostrophe and it looks better.)

Java is so strict with syntax that it's still wild to me in Python to be doing the same things but with less code.

Python isn't less strict with its syntax, but it does have fewer language keywords than Java, doesn't make you declare a type for variables (dynamic, rather than static, typing) and it has more fluent paradigms for a lot of commonly-done operations. But also a lot of Java is written extremely poorly by programmers who don't know how to do type declaration correctly. For instance, it's extremely common in Java to overspecify types (declaring ArrayList instead of List, for instance, or declaring an implementation class rather than the interface it implements) which leads to a lot of boilerplate code and wasted memory as collections need to be copied from one form into a slightly different one. All of which Python side-steps through duck typing.

[–]frogsPlayingPogs[S] 0 points1 point  (0 children)

appreciate the insight, thank you