Object Oriented One (OOO) or O³ (may also be known as ozone)
(author unknown, if don't want this img here, contact me)
// JavaScript
// instance
const oneObj = new One();
// get the value
const one = oneObj.getOne();
// use it!
i = one + i;
// OR use directly
i = new One().getOne() + i;
// extra: setOne(<value>) (value must be 1)
oneObj.setOne(1);
# Python
# instance
oneObj = One()
# get the value
one = oneObj.getOne()
# use it!
i = one + i
# OR use directly
i = One().getOne() + i
# extra: setOne(<value>) (value must be 1)
oneObj.setOne(1)
// C++
int main(){
// instance
One oneObj = One();
// get the value
int one = oneObj.getOne();
// use it!
int i = one + i;
// OR use directly
int i = One().getOne() + i;
// extra: setOne(<value>) (value must be 1)
oneObj.setOne(1);
return oneObj.getOne();
}