In many other languages, you can declare constants in the form of
"const i = 5;"
, but DM requires you to use the
var
keyword beforehand. Same goes for
tmp
and
global
. It'd be nice if using
const
,
tmp
, or
global
counted as declaring a new variable without having to use the
var
keyword (since these keywords are only used for variable declarations anyways).
var const/GOLD_VALUE = 1
var tmp/weather = "Raining"
var global/world_state = "Peaceful"
var static/fuzzy = "This is a keyword too! Honest!"
// vs...
const GOLD_VALUE = 1
tmp weather = "Raining"
global world_state = "Peaceful"
static fuzzy = "It's in the Red Book!"
I always thought that using var/ beforehand was redundant. Furthermore, static seems to have no use in DM, but would be nice when contained in a datum which could allow us to invoke static methods and variables from within the type: