TIP: Mathematica: Use of For is often a hint that Map, Table, Scan, or something else more functional could be used. But don't stress over it!

Webel IT Australia promotes the amazing Mathematica tool and the powerful Wolfram Language and offers professional Mathematica services for computational computing and data analysis. Our Mathematica tips, issue tracking, and wishlist is offered here most constructively to help improve the tool and language and support the Mathematica user community.
DISCLAIMER: Wolfram Research does not officially endorse analysis by Webel IT Australia.
Icon class
icon_class
far fa-sticky-note
icon_class_computed
far fa-sticky-note
Note kind
Policy level
Keywords

As a general rule of thumb, use of For in Mathematica is considered something of an AntiPattern and is often a "hint" that using Map, Table, or some other more functional approach could be used. But there's no need to stress over it if the code runs (offers a service via a well defined function interface).

One way of tracking it if you are using Wolfram Workbench based on Eclipse IDE is to include a trailing comment like this:


For .... (*TODO:NoFor*)

You can then, if you wish, easily find such For usages and tackle them later.

Relates to
Related notes
Related notes (backlinks)
Related snippets (extracts)
Visit also
Visit also (backlinks)