Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

11
  • 3
    $\begingroup$ good items. But for (2), I think all functions should start with lowerCase, even those in a package. Most will load a package, then call its function directly as foo[], without using package`foo[] so we are back to square one. There was a problem sometime ago with known package that used UpperCase function name, and new release of M came up with function that has the same name causing conflict. But other than a conflict issue. It best to keep UpperCase for official Mathematica use only. Even for packages. $\endgroup$ Commented Jan 28, 2015 at 15:53
  • 3
    $\begingroup$ I must disagree with (3). For longer function calls, the short forms make it more difficult to read, so they should be used inline only. Instead, the full form can be made readable by using multiple lines and indentation. I'll try to put up an example, later. $\endgroup$ Commented Jan 28, 2015 at 16:23
  • 2
    $\begingroup$ @rcollyer I don't see why there should be a separation between system functions (which can also live in the top-level code), and functions in packages, if packages are supposed to be extensions of Mathematica language. In fact, I find this rather harmful in that it reinforces the attitude that people use Mathematica + occasionally some packages, but using lots of packages is not considered normal. This is one reason why we don't have many third-party / open source projects around, although obviously not the main one (rather, it is a consequence of more fundamental ones). $\endgroup$ Commented Jan 28, 2015 at 17:26
  • 1
    $\begingroup$ @rcollyer Which is one reason why Python, for example, has a form from some-module import some-symbol, which is considered the preferred way to do imports (as opposed to from some-module import *). This makes it easy to see which symbols are imported, even in the plain-text mode. I wish Mathematica had a similar mechanism. $\endgroup$ Commented Jan 28, 2015 at 18:25
  • 1
    $\begingroup$ @LeonidShifrin: and I really would love an equivalent to pythons import x as y, but I think we had that already discussed once somewhere... $\endgroup$ Commented Jan 28, 2015 at 20:15