Message Boards Message Boards

0
|
3347 Views
|
3 Replies
|
3 Total Likes
View groups...
Share
Share this post:

What is the best file-extension to use for a package?

Anonymous User
Anonymous User
Posted 7 years ago

The documentation uses an ".m" file for its example:

http://reference.wolfram.com/language/tutorial/SettingUpWolframLanguagePackages.html

But the Mathematica File -> New -> Package command yields a ".wl" file.

What is a new user supposed to make of the discrepancy? Which one is right, and which one is wrong? Where has Wolfram hidden clear instructions for how to produce a code-library?

POSTED BY: Anonymous User
3 Replies

Neither is right or wrong. .m is slightly more compatible as it works in older versions and there are a few rare situations where it seems to be required (e.g. PacletInfo.m). You are very unlikely to come across these situations.

While .wl is newer, using .m will have no disadvantages at this point.

You will notice that all files in Mathematica's installation directory still use .m as of 11.1.

If you look at packages published by people at Wolfram, you will find that some use .m and some use .wl. Generally, it is a good idea to use these packages (such as GitLink) as a model.

POSTED BY: Szabolcs Horvát

Joe,

Both work. Use .wl it's the newer standard. I can send you better instructions with an example when I get to my computer

POSTED BY: Neil Singer
Anonymous User
Anonymous User
Posted 7 years ago

Thanks again.

POSTED BY: Anonymous User
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract