Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Generating static arrays during compile time in Rust
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Generating static arrays during compile time in Rust
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Array in Golang is similar to Array in Rust in the sense that the length of an array is part of its type and must be determined at compile time.
Array is a primitive (value) type in Golang. When assigned to another variable or passed as a parameter, it is copied! For this reason, array is not a good interface to use. Slice is prefer to array for function parameters.
The Pythonic way of checking whether a collection (string, list, set, dict, etc.) coll
is non-empty is to use if coll
.
However,
do NOT use if arr
to check whether a numpy array is non-empty or not.
Instead,
you shoule use arr.size >0
to check whether a numpy array is non-empty or not.
Use ==
(instead of the method Object.equals
) to compare objects is a common and tricky mistake for beginner.
You cannot define an abstract static method. This is because "abstract" means that no functionality is implemented while "static" means that functionality exists even there is no object. The two conflict in concept.