libera/#commonlisp - IRC Chatlog
Search
18:49:43
bitblit1
Are global variables dicouraged in comparison to passing something like XDisplay to everrrrry function?
18:50:25
bitblit1
Thinking about it common lisp symbols and packages mostly solve the issues with global vars no?
18:57:37
random-nick
and sometimes a keyword argument is used with a default value looking up a special variable
18:58:19
random-nick
that's kind of similar to how streams can be passed to standard functions via arguments or via special variables
18:59:55
random-nick
if you don't like special variables and don't like passing everything via arguments, you can try somehow hiding passing via arguments using macros, but that can be tricky and hard to read to everyone unfamiliar with your technique
20:16:20
aeth
in part because while it seems like every function at first, it quickly turns out not to be (and if it still is, then your functions are probably too big)
20:16:47
aeth
But now you win because now you have functions where it can be accessed and functions where it can't, while a special or global is potentially accessed in that whole call stack.