Timeline for What's the difference between these two ways of specifying dependent packages?
Current License: CC BY-SA 3.0
16 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 14, 2024 at 12:33 | comment | added | Leonid Shifrin | @user13892 That merits a full-fledged separate question to be asked on the site. I can't promise to answer that right away, but can try to do that soon enough, and if I don't, it would allow others who can, to answer that too. | |
| Feb 7, 2024 at 15:31 | comment | added | user13892 | @LeonidShifrin since you mentioned the words PrivateImport and PublicImport, I thought you might help me with a question regarding a few properties in the newer Paclet System's PacletObject[...]. There is a property called "HiddenImport" and "PrimaryContext". Can you explain what they are and how they work? | |
| Jun 16, 2020 at 9:23 | history | edited | CommunityBot | Commonmark migration | |
| Nov 1, 2012 at 22:05 | comment | added | Leonid Shifrin | @magma He has been (and continues to be) involved in the parallel programming functionality of Mathematica. | |
| Nov 1, 2012 at 22:04 | comment | added | magma | @LeonidShifrin I always wondered if he was still actively involved with WRI. Do you know if he still is? I do not remember having seen his name mentioned recently. | |
| Nov 1, 2012 at 17:26 | comment | added | Leonid Shifrin | @magma Yes I agree. I had a chance to chat with Roman during this conference, and mentioned this. My impression was that he wouldn't mind doing that in principle, but is busy like anyone else is these days. | |
| Nov 1, 2012 at 17:23 | comment | added | Leonid Shifrin | @rcollyer I think this is a good thing (leaky encapsulation), on a large scale at least. The reason I think so is that the other side of it is the level of control over the encapsulation given to the end user. For good programmers, more control is always good, and bad programmers will write bad code in any language. This is IMO different from the leaks of lexical scoping (small scale encapsulation), which are more worrisome. | |
| Nov 1, 2012 at 15:06 | vote | accept | user13253 | ||
| Nov 1, 2012 at 12:52 | comment | added | rcollyer | Although, encapsulation is leaky in packages. All symbols are ultimately accessible. | |
| Nov 1, 2012 at 10:23 | comment | added | magma | I agree with you @LeonidShifrin that Maeder's books are still the best in many respects. I only wish they would be updated/expanded to cover the current MMA version. They were written in the 90's and cover versions 2.x and maybe 3.0. Yet they are still very relevant due to the smooth evolution of MMA in the following 20 years. | |
| Nov 1, 2012 at 6:01 | comment | added | Leonid Shifrin | @AndrewMoylan Thanks, Andrew. The name is not mine though, it was used by Roman in his book. | |
| Nov 1, 2012 at 5:48 | comment | added | Andrew Moylan | +1 For the important usage guideline of generally using the second form unless necessary. I like the name "private import" too. | |
| Nov 1, 2012 at 5:26 | comment | added | Leonid Shifrin | @rcollyer Yes, could be. One can surely imitate the action of BeginPackage and EndPackage by the top-level code, that's what I think is really important - we are given a great deal of control over encapsulation, which is what I think is a right design. | |
| Nov 1, 2012 at 5:15 | comment | added | rcollyer | Likely the mechanism is implemented via Begin[{$ContextPath}, ...] (or similar) and Needs is either called before it (public import), or within the body (private import). So, that when $ContextPath reverts to its original value, any package loaded privately is removed from the $ContextPath, also. | |
| Nov 1, 2012 at 4:50 | history | edited | Leonid Shifrin | CC BY-SA 3.0 | added 146 characters in body |
| Nov 1, 2012 at 4:45 | history | answered | Leonid Shifrin | CC BY-SA 3.0 |