New answers tagged

2

This is sort of what the `Private` context is meant to be doing for you. You write that you just need more contexts that can behave like Private context for organizational purposes, and this can be achieved using subcontexts that use a `Private` mark. My normal instinct would be to put the helper functions to MainFunction inside a `Private` branch of ...


7

I've certainly encountered this behavior before. While I can't speak authoritatively, I'd think this is as designed, although it does introduce certain inconsistency. I also think that this issue is a result of clash of cultures: the end user - oriented one from the earlier days of Mathematica, and the one coming from standard software-engineering practices. ...


2

What features I/we/developers need: allowing (only) MyPackage` to use particular non System` packages e.g. using GeneralUtilities` functions after BeginPackage["MyPackage`"] allowing user to use particular non System` packages (only) after loading MyPackage` e.g. After << MyPackage` I would like to be able to call PrintDefinitions from ...


3

It returns 0 because you are doing something like: D[ Sin[Global`x1], MyP`Private`x1] (*Global` or current $Context really*) Why? You can read more in a related topic: Behavior of Remove inside a Package and in the general one I'm encouraging you to become familiar with: How symbol lookup actually works There are some tricks available to detect a ...



Top 50 recent answers are included