3 ms·
It's like `make make make make`. But it is nice that in CL you don't have to jump through hoops on common words that happen to be function or package names. You
by Jtsummers 4y ago
It's like `make make make make`. But it is nice that in CL you don't have to jump through hoops on common words that happen to be function or package names. You have a list and no meaningful name? Call it `list`:
(defun some-algo (list ...) ...)
Sure you can abuse this, everything can be abused. But I'd rather risk an asshole doing that `let` thing (which wouldn't make it past code review) than have more name collisions and naming contortions to avoid them. If the language at least warned on renaming it would be helpful, but then you get things like Go. When I was learning it I accidentally overwrote some built-in function (I don't recall which one, it wasn't actually `make` like in this demo):
package main
func main () {
make := 10
aMap := make(map[int]string) // this is now an error
}
I wish I could remember what it was, it was a reasonable name in context (unlike `make` above). But it had a similar effect and a similar strange error. The error is at the function call site, which is technically correct because you're trying to use an `int` (here) as a function. But `make` (above) and similar functions should probably get a warning emitted when you redefine them, at a minimum.