Timeline for How do packages handle local variables?
Current License: CC BY-SA 4.0
13 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 10, 2024 at 9:23 | history | became hot network question | |||
| May 10, 2024 at 2:18 | history | edited | ions me | CC BY-SA 4.0 | more info on example 1 |
| May 10, 2024 at 2:09 | history | edited | ions me | CC BY-SA 4.0 | added 508 characters in body |
| May 10, 2024 at 2:00 | answer | added | Nasser | timeline score: 4 | |
| May 10, 2024 at 1:47 | history | edited | ions me | CC BY-SA 4.0 | included example2 |
| May 10, 2024 at 1:46 | answer | added | Tapiocaweasel | timeline score: 2 | |
| May 10, 2024 at 1:44 | comment | added | ions me | In other programing languages though, if you are inside a package, everything is assumed local by default. | |
| May 10, 2024 at 1:43 | history | edited | ions me | CC BY-SA 4.0 | included example2 |
| May 10, 2024 at 1:42 | comment | added | Tapiocaweasel | Thanks for the update. I think `Collatz`Collatz` is the best solution. Handily, MMA will let you know with the warning message and also by making all occurances of `Collatz` highlighted Red. But I'm not sure there's much to be done other than to try not to step on your own toes. MMA can't read minds unfortunately. | |
| May 10, 2024 at 1:34 | history | edited | ions me | CC BY-SA 4.0 | included example |
| May 10, 2024 at 1:29 | comment | added | Nasser | If you put your package wide variable inside the Private part of the package, then it will not conflict with global variables with same name. If you put it outside the Private part of the package, then by design, it will exported and be visible. I never use package wide variables myself. I keep variables local to each module. Like you would do normally with Modules. | |
| May 10, 2024 at 1:27 | comment | added | Tapiocaweasel | Can you be more specific about what you're concerned about? | |
| May 10, 2024 at 1:20 | history | asked | ions me | CC BY-SA 4.0 |