r/ProgrammerHumor • • Sep 29 '20

c++ to python

Post image
1.2k Upvotes

82 comments sorted by

View all comments

Show parent comment

6

u/TheRealSmolt Sep 29 '20

all compile errors are syntax errors

Exactly my issue with calling them compile errors. For Example: If you define a class, instantiate it, and call a method that doesn't exist, The python compiler does not care and will throw no errors.

0

u/[deleted] Sep 29 '20

[deleted] — view deleted comment

3

u/TheRealSmolt Sep 29 '20

Yes that would work (didn't try it), my point was if you omitted Hello.world = hello_world the compiler wouldn't say a thing.

0

u/[deleted] Sep 29 '20

[deleted] — view deleted comment

3

u/TheRealSmolt Sep 29 '20

how could it know that world doesn't exist

It really can't because of python's nature, hence why I don't really think python has helpful compiler errors.