Questions on how to write code in a better or different style, using Mathematica's capabilities for coding in multiple styles.

learn more… | top users | synonyms

5
votes
1answer
287 views

Alternative to overloading Set

In the ideas shared in my answer to this post Struct equivalent in Mathematica? at the end I propose a solution that changes the way Set works in a particular case that can be expressed in plain words ...
81
votes
7answers
8k views

Struct equivalent in Mathematica?

I really miss having something like a struct in Mathematica. I know of (and regularly use) a couple of programming techniques which feel like a ...
12
votes
3answers
443 views

With versus Function

I've seen people compare Block with Module and With as scoping constructs, and try to figure ...
37
votes
5answers
721 views

Placement of Condition /; expressions

It is my practice to place Condition expressions on the left side of := and :> in almost ...
106
votes
3answers
16k views

Alternatives to procedural loops and iterating over lists in Mathematica

While there are some cases where a For loop might be reasonable, it's a general mantra – one I subscribe to myself – that "if you are using a ...