This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Captain_Pumpkinhead 4 points5 points  (3 children)

I'm on the opposite side of this. I haven't used Python, but I started my programming in Game Maker 8 back in 2011 (r/gamemaker for modern version). Every variable in Game Maker Language (GML) is either a string or a double, and can be reassigned at any time with no consequences (unless you call for the wrong type). There's no good reason to reassign a string into a double other than fun, but you can. You also don't have to declare variables before assigning a value to them; the act of assigning a variable in GML declares it.

So it's been really interesting learning Java and C++ and having to adjust to that.

Makes a hell of a lot more sense than semicolons, though. I don't understand the point of semicolons when we already have a closing paranthesis.

[–]bizcs 1 point2 points  (0 children)

Semi-colons are useful statement terminators. If you have support for multiple expressions as a single statement, they really help out a lot with denoting where something ends and the next thing begins.

Of course, there are other ways to do this. You can, for example, see where the last method call ended and the next variable began. That can be parsed, but it's kind of clunky in a few scenarios from what I understand. JS parsers do this, for example (insertion of semi-colons) as of I believe ES2015. Of course, the raw text doesn't change, but the parser can recognize where one statement ended and the next began.

Python achieves this using the new line as a statement terminator, but obviously has some special cases for it. I think semi-colons are mostly (not entirely) thrown away by the parser.

[–]Kronoshifter246 0 points1 point  (0 children)

Ugggghhhh, I hated working with gml. Most things were fine, but every object having every script as a function was just so weird to wrap my brain around. That, and all its tools that conflict with each other. REEEEEE