New Functions I would like to see in future Wolfram Language versions

I was wondering, it would be interesting to try to use the community as a way to request new functions that could be incorporated into new versions of Wolfram Language, in a colaborative way. Sometimes users simply don’t have the whole/deeper system view, to understand that the requested function is or too specific, too broad or already implemented, but I believe that another times we can have a nice insights, that Wolfram Research people haven’t yet, or that do not have received much attention yet. To the idea is:

Post your’s requested Function as a answer to this question, and let’s upvotes show the more interesting ones!

Some rules
1- One Post per function (or class of function), you can have more than one request.
2- Exemplify your function use.

A class of functions that I would like to suggest is not a new one, but a extension of Scan function. Here are the function:

    ScanOuter
    ScanThread
    ScanInner
    ScanIndexed

Each one would have the same syntax use of their equivalent (Outer, Thread, …), but with the same behavior as Scan, with much less memory consumption, due the fact that Scan don’t have to “Save” all it results. Other advantage would be to use of Return inside, that opens the possibility to break computation at some moment.As an application example, sometimes I need to apply a function into all combination of to big groups, to take just some specific itens.
Let’s simulate the lists using a RandomInteger, and Outer to simulate ScanOuter.

list1 = RandomInteger[1000, {10000, 2}];
list2 = RandomInteger[1000, {10000, 2}];
Reap[Outer[If[N@Norm@{##} > 1700, Sow[{#1, #2}]] &, list1, list2, 1]][[2]]

I believe that this kind of calculation would use much lass memory with the equivalent Scan function, that do not need to store each result.
The calculation above simple don’t run in my computer (in less then 5 minutes), and should be almost instantly in ScanOuter.

Another nice application is ScanIndexed.
Imagine you want to know the position of the element, when it’s > 0.8 in this list.

list={0.0314503,0.168573,0.291282,0.319608,0.426414,0.430967,0.626601,0.897033,0.923966,0.944242}
pos=ScanIndexed[If[# > 0.8, Return[First@#2]] &, list]

To to things like this today, you have to create a index variable, or use a While loop, what makes me very incomfortable inside WL paradigm.
ScanIndexed could some this in a more elegant way.

I’ve been working on a list of potential library extensions that would not go in the System namespace as part of Wikicode.
Wikicode to-do list

I was going through implementing stub packages for various articles, but I figured I could get a handle more quickly on larger design issues if I just started making a big to-do list. I’m browsing through articles by how close they are to root categories and how popular they are. I’m looking for data visualizations, models, tables, etc that aren’t currently in Wolfram Alpha and that could currently be implemented in a page of code or less. Over time, the sophistication of what can be implemented in a page of code will increase and we can build more complex models.

The code for each will go in the Wikicode package with the same name as the associated Wikipedia article. Packages can dynamically load other packages. Contexts are typically be based on the article title, but can be nested when necessary to prevent clutter. (e.g. “Economy of the United States” data might go under UnitedStates`Economy if UnitedStates gets too cluttered)

I’ve been asked what an item like “Aluminum: visual attributes as solid” means. For now, it would be convenient just to have named sets of graphics directives for color, transparency, specularity, etc. for common materials. So if I had a model of a soda can I could just put Aluminum`Material[] before it to quickly get something metallic looking. There are plenty of cool opportunities for using parametrized 3D color textures. For example, cutaway views of a simple strawberry model with adjustable size and randomized shape can be supported.

I would like to see an option DeleteDuplicates for Sort.

I have made my own library that implements a function that does the same as DeleteDuplicates, for sorted lists (as it is, it only works for integers). See this. For the case I tested it on it was about twice as fast as DeleteDuplicates.

But having the option to delete duplicates while sorting would be even nicer and it would make that library much less “needed”.

I’d like to see ParameticFindMinimum which would enable running the same optimization problem with different starting points over and over again without setting up the problem each time. There already is ParametricNDSolve, which enables repeated solutions of the same differential equation with different parameters values.

Hi Jacob,
Union[] will give a sorted list of the unique elements in its argument.
Best, David

David, thank you so much :).

Rodrigo, what are your comments on MapIndexed versus ScanIndexed - any great advantages there?

You can do the calc just like this:

Scan[If[#[[1]] > 0.8, Return[#[[2]]]] &, MapIndexed[{#, #2} &, list]]

But for a big list, this is a waste of memory too, to apply MapIndexed to it, just to create a index.
You can of couse use a For with Return, but I don’t feel it’s a nice WL code approach.

Unify[ notebookfile, notebookfile] which does a Prolog style, but Mathematica aware, unify of two notebooks, showing the minimal changes needed to make the two identical.
Diff[ notebookfile, notebookfile] which does a Unix style, but Mathematica aware, diff of two notebooks, showing the minimal differences between two notebooks.

Both of these would be very useful in trying to expose the changes that have been made over time to a sequence of notebooks.

Novice mode, possibly even on by default, but easily able to be turned off by those who cannot accept having their likely typos pointed out, which would provide help messages to explain, especially to novice users, how Mathematica’s expectations differ from their expectations. This would give clear specific help messages, as opposed to the current messages, which would explain what a novice almost certainly needs to change in their input. This would include help for users who have become convinced they must desktop publish their input to Mathematica.
Highlight the “offending characters” in red, perhaps even blinking red, to direct attention to exactly where something needs to be changed. While most new users don’t seem to write long lines, having the attention focussed on one or a few characters would greatly help. I can recall years ago writing some longer and more complicated expressions and staring at them trying to understand exactly where in that line the message I was supposed to focus my attention.
If it could be possible that this be driven by a user readable and possibly even editable, by advanced users, database of rules then this might open up opportunities to experiment with enhancing this. Initially covering really really well the top few dozen most common misunderstandings by new users might help new users scale the learning curve much more rapidly.

A pointer in the various error messages returned by DSolve and and similar functions to a tutorial that explains how to provide all the various forms of initial and boundary conditions to obtain satisfactory solutions.

A pointer in various, perhaps new, warning messages returned by Solve and relatives to a concise tutorial that explains how to decide what function other than Solve might be more appropriate for the problem that was just given to Solve.

I would like to see a high quality and fast Delaunay triangulation algorithm included as a built-in function. Constrained Delaunay triangulation should be supported. Something akin to TetGenLink, but for 2D, would be very nice.

The function from the Computational Geometry package is implemented in Mathematica and is much too slow for many real-world applications.

What I really need almost every day and what is missing in Mathematica for many years is built-in user-friendly ticks generation function. The CustomTicks` package is not sufficiently flexible and easy to use. And why we even have no such functions as LinTicks and LogTicks built-in?! Also we still have no way to control the distance between the ticks and tick labels and between tick labels and frame labels (this distances often are too large by default). All this functionality is crucially important for creation of aesthetically pleasing graphics for publication purposes but up to this time a user must spend a lot of time fighting with extremely user-unfriendly Ticks option and finally anyway cannot achieve the desired appearance.

I agree with the need for better control of ticks in graphics. But the need goes much further. While our ability to produce good graphics has improved with the recent releases, producing publication quality graphics for scientific journals is still a nightmare. Of course, you can do it, but only by generating an entire page of complicated scripting of graphics primitives.

I would like to see Wolfram take this issue seriously. A good start would be to look at available tools such as Igor Pro 6, SigmaPlot, and Origin -- and commit to producing a competetive capability within Mathematica. These tools also provide data analysis capabilities, but Mathematica already excels at this. All it lacks is the ability to make good presentation graphics.

A very simple addition to ExampleData: icon images.

open, close, process, new, add, remove, delete, warning, attention, error, etc

Functions dedicated to elliptic curve cryptography especially curves of the form y^2 = x^3 + a x + b for several pairs {a,b}

e.g. Objects Secp[256k1] could be equivalent to EllipticCurve[0,7] and represent the locus of points on y^2 = x^3 + 7

e.g. Char[Secp[256k1]] = 2^256 - 2^32 - 977
Then you could do a lot with tables or plots…without really checking my syntax…here’s an example

ListPlot[ Flatten[
                Table[Table[
                                Base58[
Char[ EllipticCurve[i, k] , {k,1,10}] {i,-10,40}] ] ]] ]

• PubKey → PrivKey complexity order estimations, and other functions

e.g. CrackTime[pubkey, curve, speed…] = 10^897 years (ok, safe key…)

e.g. ValidKey[pubkey, privkey, Secp[256k1]] = True would verify a keypair

• emulate parts of keypair exchanges to examing faults

e.g. SignMessage[<message>, <type…]

e.g. SharedKey[EllipticCurve[0,7], <secret>, <modulus>]

• Hash pre-image time complexity computations

e.g. CrackTime[SHA512, <string>, …]

• String Entropy
Complexity[<correcthorsebatterystaple>] = …

• Rainbow tables

• Base58 encoding support and in general greater fluency in integer representations

So, so, so much could be done. I just rattled this list off the cuff. If there is interest I will put more thought into exactly what would be excellent and write it up formally.

I’d like to see CompilationTarget->“C” with Compile, which means actually CCodeGenerator to be available on ARM
or Raspberry-Pi…however.

I don’t see what complications it involves to support the package on this platform, but there might be
a deeper reason why. If someone can enlight me I’d be rather thankful.

  • DropWhile
  • StringTake with argument that do not generate an error if the string is too short
  • StringStartsWithQ

some version of Row and Column that have the same syntax and options, or an tutorial explaining why they don’t