54

In Mathematica 10.x, one now has both .wl Wolfram Language Packages and .m Wolfram Mathematica Packages.

  • What's the difference?
  • Is one of the two formats to be preferred in certain situations and, if so, which one and where?
  • Why, after making the menu selection File > New > Package, entering code, and saving, is it offered as default to save in the .wl format?

I have read the discussion here, but failed to see there satisfactory answers to those questions.

Note: I don't find any listing of Wolfram Language Package here.

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
murray
  • 11,888
  • 2
  • 26
  • 50
  • 6
  • just the file ending AFAIK, 2. if you have installed matlab (or another software which also uses .m file extension) it is easier to let the OS distinguish between matlab files and mathematica packages, 3. because that now seems to be the extension prefered by WRI, most probably more for marketing reasons than because of 2. My impression is that .m was just left to work for compatibility reasons, but maybe I'm wrong with that...
  • – Albert Retey Nov 09 '15 at 15:11
  • 3
    it seems that there are differences in the order in which package files are loaded (check the wolfram groups discussion mentioned in your question). But that will probably only be relevant when you mix old (.m+Kernel/init.m) and new (.wl only) conventions... – Albert Retey Nov 09 '15 at 15:16
  • 2
    one more thing: it seems that workbench still doesn't know about .wl files, but maybe I just don't know how to get the most recent version, does anyone know what the newest is? The update site announces 2.0.138 to be the newest for years... – Albert Retey Nov 09 '15 at 15:42
  • 1
    Also, .m files are Objective C source files on the Mac, I believe. – Pillsy Nov 09 '15 at 18:08
  • 3
    avoiding collision with matlab is a very good / welcome reason! – george2079 Nov 09 '15 at 18:20
  • 5
    Currently all descriptions involving packages in Wolfram Language Documentation use files ending with .m instead of .wl, which is quite weird. – hxiao Nov 15 '15 at 05:47
  • @Albert Would you consider converting your comments into an answer? You have made some interesting observations and the question has generated quite a bit of interest in the months since it has been asked, so it would be worthy of an answer. – MarcoB Jun 04 '16 at 06:16
  • @MarcoB: good point, I was not expecting noone else would give a better answer. I just have added one. – Albert Retey Jun 04 '16 at 10:27