3 ms·
Slightly tangent but one thing that these code practices languages often miss is using the language to its fullest. Most beginner developers who are not very us
by kretaceous 5y ago
Slightly tangent but one thing that these code practices languages often miss is using the language to its fullest. Most beginner developers who are not very used to the language reinvent the wheel for a lot of in-built functions. For example, I've seen stuff like:
`
const arr = [];
for (let i = 0; i < anotherArray.length; i++){
arr.push(someOperationOnEachElement(anotherArray[i]))
}
`
instead of
`const arr = anotherArray.map(someOperationOnEachElement)`
Not knowing what your tool/PL can do can lead to hard-to-maintain code. One should really leverage the expressiveness and syntactic sugar wherever relevant.
- deleted 5y ago[deleted]
- kretaceous 5y agoEDIT: code practices languages -> clean code practices articles* can do can lead -> can lead (There's no edit option for me, so replying:)