Re:Programming Languages Going Above and Beyond
by hdctambien on Thursday June 29, 2023 @08:57AM
(#36519770)
I don't know about programming languages, but in mathematics |v| is the notation to get the length of a vector... So maybe Matlab uses that syntax?
Re:Programming Languages Going Above and Beyond
by RGBCube on Thursday June 29, 2023 @12:47PM
(#36523055)
FYI, MATLAB uses `length(v)` to get the length of vector v.
Re:Programming Languages Going Above and Beyond
by jbl on Thursday June 29, 2023 @08:56AM
(#36519754)
|array| looks like it’s taken from the notation for cardinality of a set (number of elements in a set)
I hope this is a typo. Otherwise it…requires an unmatched close paren?
That's a new level of cursed syntax.
EDIT: Also, is |array| a common way to get the length of an array in languages? I've never seen that (or some of this other syntax) before and it took me a minute to figure out what was happening.