How I can define named constants in Sophia? I want for example be able to define
const BOARD_SIZE = 8
Is this possible or shall I use a constant function e.g:
private function get_board_size() = 8
Thanks.
How I can define named constants in Sophia? I want for example be able to define
const BOARD_SIZE = 8
Is this possible or shall I use a constant function e.g:
private function get_board_size() = 8
Thanks.
No, there is no top level let
in Sophia yet so you can’t define a constant.
A private function will work…