On the matter of singleton instances and constructors
Posted: Sun Feb 20, 2011 9:24 am
1.75 warns when you access properties on
I could add warnings for some of these in 1.75.1, if they are known to be widespread problems, but I suspect the most-abused are the first two, and they have complications that make warnings impractical.
System
or Player
instead of system
or player
. However, these are not the only cases of this problem. The others are, in approximate order of obscurity:
-
Manifest
: useplayer.ship.manifest
(preferred), ormanifest
. -
PlayerShip
: useplayer.ship
. -
Mission
: usemission
. -
Oolite
: useoolite
. -
Clock
: useclock
. -
MissionVariables
: usemissionVariables
. -
Global
: useglobal
, although in general you should just usefoo
instead ofglobal.foo
. -
Console
: useconsole
.
I could add warnings for some of these in 1.75.1, if they are known to be widespread problems, but I suspect the most-abused are the first two, and they have complications that make warnings impractical.