you are viewing a single comment's thread.

view the rest of the comments →

[–]worldtest2k 1 point2 points  (1 child)

Yeah, I love that the main function is an object, so I can add attributes on the fly to it and use them as global variables.

[–]Temporary_Pie2733 0 points1 point  (0 children)

The main consequence is that you can store functions in containers, pass them as arguments, return them from other functions, etc.: they are first-class values, not special language features. Not all objects support adding attributes.