nimlings
nimlings copied to clipboard
Possible type in Exercise 2
In Exercise 02, in the last section the comments say (emphasis mine):
This probably won't compile because it cannot evaluate
totalArea
at compile time. Maybe we can change the variable type oftotalCost
to something that evaluates at compile time. Hint:var
evaluates at runtime.
It's confusing, I think the second compile should be runtime, since it won't evaluate at compile time, it can't be changed to something will evaluate at compile time and the hint makes no sense if it's supposed to be done at compile time.
This is entirely based off the fact that totalArea
doesn't need to be compile time becuase technically speaking they all can probably shifted over to const (confirmed they can) and then they all are compile time constants.