Constructor placement / location?
In every video Guil has the constructor near the bottom of the class with the methods before. For me it seems more natural to have the constructor first, at the top. The code seems to work both ways.
Is the way Guil defines a constructor the preferred convention? Or does it not matter?
Steven Parker170,377 Points
Technically, it doesn't matter.
And i'm not sure if there's an actual "convention"; but like you, I also prefer to place constructors at the top.
Just a note about this -- it technically doesn't matter where the constructor goes, but I've noticed that Workspaces does not like it if the constructor goes at the very top. Not sure why this is. If you put your constructor at the top, with no functions above it, the syntax highlighting (i.e. the different colors) goes all wonky.