Linked Questions

0
votes
0answers
73 views

Is there in Mathematica something like class in Java or struct in C? [duplicate]

I am new to Mathematica and I am very impressed with its features. Although I don't understand how to do a simple thing: for example, I want to create few point variables (say a,b,c,d,e), each storing ...
3
votes
0answers
47 views

Is there an equivalent to defstruct in Lisp for Mathematica? [duplicate]

I guess I am used to using data structures in most languages, the closest function for Mathematica would be similar to the defstruct macro in Lisp... is there such a thing?
526
votes
19answers
130k views

Where can I find examples of good Mathematica programming practice?

I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...
154
votes
8answers
17k views

List of compilable functions

Is there somewhere a list on the functions that Compile can compile, or the cases in which a particular function can be compiled that I haven't found? I'd be glad ...
128
votes
8answers
7k views

Can one identify the design patterns of Mathematica?

... or are they unnecessary in such a high-level language? I've been thinking about programming style, coding standards and the like quite a bit lately, the result of my current work on a mixed .Net/...
145
votes
3answers
10k views

How to make use of Associations?

I have been curious about it for long. Now that Mathematica 10 arrives, I think it's time to ask the question: How the new Association data structure would be used ...
81
votes
4answers
4k views

Automatically generating a dependency graph of an arbitrary Mathematica function?

Has anyone written a function to pull the function dependencies of a function? That is, it would be nice to have a function that returns a list of function dependencies as a set of rules, terminating ...
71
votes
4answers
5k views

Once more on object orientation in Mathematica: does it have to be so hard?

Recently I came across a set of problems which would be solved most easily within an object-oriented approach. I first attempted to solve them by other means, but found the complexity of the code ...
115
votes
1answer
7k views

File-backed lists/variables for handling large data

Background Currently I am working with some large data (most of it generated by Mathematica itself). I usually find it a hassle to do this. For example, I just exported a large amount of data to ...
39
votes
4answers
3k views

Compiling more functions that don't call MainEvaluate

I would like to use Compile with functions defined outside Compile. For example if I have the two basic functions ...
36
votes
4answers
3k views

Do people actually use UpValues?

I know what they are and how to define them. They have to serve some purpose - else why include them? But I never used them and all examples on this site and the docs never show a practical use of <...
33
votes
3answers
1k views

Is using undocumented functionality a Bad Idea™?

Mathematica has a lot of very useful undocumented features. For example a hash table, a built-in list of compilable functions, additional options to CurrentValue, ...
19
votes
8answers
2k views

How to Set parts of indexed lists?

I would like to assign a list to an indexed variable and then change it using Part and Set like this: ...
25
votes
4answers
703 views

What is the point of Refresh if Dynamic has an UpdateInterval option?

I haven't found an example where I can't get rid of Refresh[]: ...
10
votes
3answers
4k views

Using D to find a symbolic derivative

I need to do the following: Define a function Take the derivative of this function and have a look at the symoblic representation Substitute in some values With the bonus that I want to use the ...

15 30 50 per page