Timeline for When to name a variable with $
Current License: CC BY-SA 4.0
2 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 4, 2018 at 4:20 | comment | added | Reb.Cabin |
I have a long-running habit of appending $ to ad-hoc variables, that is, variables that I reuse without ClearAll . When developing iteratively in a notebook, it's important to clear variables before defining rules for them lest stale definitions from elsewhere in the Notebook leak in and fool you. But certain variables are just there for ad-hoc tests and the risk of stale definitions is negligible. Example: f$ = m * a[q,t] for a Newtonian force, where a is a carefully defined function with a ClearAll before its definition.
|
|
Jul 3, 2018 at 0:39 | history | answered | Ronald Monson | CC BY-SA 4.0 |