3 ms·
Or, the language designer thinking he's saving programmers work by jus returning the value in cases where there is a list of length one. However, he's really m
by metaobject 9y ago
Or, the language designer thinking he's saving programmers work by jus returning the value in cases where there is a list of length one.
However, he's really making it worse because now all return values from that function have to be type-checked to see whether they are scalars or lists.
- user5994461 9y agoThe classic story of every interpreted language.
- sixbrx 9y agoR comes to mind, where once in a blue moon a matrix result will happen to only have a single column, which R helpfully decides should be turned into a simple vector, which then doesn't have the matrix operations available anymore (like dim()), and kaboom!