Timeline for How to unprotect a variable in a package
Current License: CC BY-SA 3.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 13, 2014 at 16:46 | vote | accept | Nick | ||
Aug 13, 2014 at 14:12 | answer | added | Szabolcs | timeline score: 9 | |
Aug 13, 2014 at 7:35 | history | tweeted | twitter.com/#!/StackMma/status/499459126217687040 | ||
Aug 13, 2014 at 5:50 | answer | added | Mr.Wizard | timeline score: 10 | |
Aug 13, 2014 at 4:01 | comment | added | rm -rf♦ |
@Nick As others have mentioned, there is a collision with a built-in function. I would not recommend clearing the definitions of the System` symbol to make way for yours, because you never know what depends internally on what (and it is a bad practice, period.) and you could be doing more damage than you think. Rather, you might want to look at using the full contexts, such as MyPackage`MySymbol and System`MySymbol . This way, you get to use both functions. You can also change the order in which the contexts appear in $ContextPath to determine which definition is used first.
|
|
Aug 13, 2014 at 3:56 | comment | added | rm -rf♦ | @AlexeyPopkov I don't think it does... all that OP needs to learn is some context management, which is not hard. I don't think that everyone needs to strictly adhere to this maxim for their packages. | |
Aug 13, 2014 at 3:41 | history | edited | m_goldberg | CC BY-SA 3.0 |
Moderate clean-up
|
Aug 13, 2014 at 2:06 | comment | added | Alexey Popkov | This perfectly illustrates the rule that the user-defined symbols should always start from a lower-case letter. | |
Aug 12, 2014 at 21:11 | comment | added | Nick | I am aware of this. However this function has been a staple for almost 4 years used throughout various notebooks and packages. It would be much better if there was just a way to remove the definition. For example Sqrt[] is protected but it is extremely easy to change the definition. | |
Aug 12, 2014 at 21:00 | comment | added | Greg Hurst |
RemoveBackground is a new system function. You'll need to change the name of yours. See reference.wolfram.com/language/ref/RemoveBackground.html
|
|
Aug 12, 2014 at 20:30 | review | First posts | |||
Aug 12, 2014 at 20:32 | |||||
Aug 12, 2014 at 20:30 | history | asked | Nick | CC BY-SA 3.0 |