Wolfram Library Archive


Courseware Demos MathSource Technical Notes
All Collections Articles Books Conference Proceedings
Title Downloads

A New Mathematica Programming Style
Author

Kristen Carlson
Conference

2007 Wolfram Technology Conference
Conference location

Champaign, IL
Description

A new Mathematica programming style that emphasizes prefix and postfix-pure function is presented as an alternative to the traditional matchfix-dominated style. Postfix-pure function amounts to a functional-procedural fusion that makes it easier for non-functional programmers, such as procedural programmers, to learn Mathematica than via matchfix style. Prefix simplifies expressions, while necessitating familiarity with the operator binding strength or precedence present in Mathematica. Accordingly, the 1000-scale precedence table for shorthand operators is given for Version 6.0.

Brief examples:
Traditional Matchfix h [ g [ f [ x, y ], z ], j ]
Postfix-Pure Function f [ x, y ] // g [ #, z ]& // h [#, j ]&
Prefix f @ g @ h @ i
Finally, a few thoughts on Mathematica's place in the intellectual evolution of programming languages are offered.
Subjects

*Wolfram Technology
*Wolfram Technology > Programming
URL

http://www.wolfram.com/news/events/techconf2007/
Downloads Download Wolfram CDF Player

Download
ProgrammingStyles.nb (267 KB) - Mathematica Notebook [for Mathematica 6.0]