Python – What makes a scientific programming language, scientific

programming-languagespython

Why are some programming languages such as Python or Julia considered to be "scientific" programming languages? I guess my real question what is the criteria that makes a programming language scientific?

Best Answer

Jeff Bezanson's PhD thesis on Julia, "Abstraction in Technical Computing" discusses this question at length, reaching only partial answers. Here are key quotes.

We propose that technical users crave the flexibility to pick notation for their problems, and language design — the highest level of abstraction — is where you go when you need this level of flexibility.

When using general purpose languages for scientific computing,

Effective scientific libraries extensively employ polymorphism, custom operators, and compile time abstraction. Code generation approaches (writing programs that write programs) are unusually common.

Contrasting the design priorities of mainstream programming languages vs. scientific (technical computing) languages: Contrasting design priorities

The priorities in each row are not necessarily opposites or even mutually exclusive, but rather are a matter of emphasis. It is certainly possible to have both parametric and ad hoc polymorphism within the same language, but syntax, recommended idioms, and the design of the standard library will tend to emphasize one or the other. Of course, the features on the left side can also be useful for technical computing; we exaggerate to help make the point.

Another factor is "convenience" (productivity) in how much you need to know to use a given piece of functionality,

This leads languages to adopt various forms of loose coupling, automation, and elision of software engineering distinctions that are considered important in other languages. ... These systems are function-oriented, typically providing a rather large number of functions and a much smaller number of data types. Type definitions and features for organizing large systems are de-emphasized.

I interpret "eliding software engineering distinctions" as emphasis on rapid and exploratory development over teamwork, portability, maintainability, usability, testability, deployability, etc.

Informally, in order to provide the desired experience a language needs to be able to assign a meaning to a brief and isolated piece of code such as sin(x). This leads directly to making declarations and annotations optional, eliding administrative tasks like memory management, and leaving information implicit (for example the definition scopes and types of the identifiers sin and x).

The author mentions cultural differences, e.g. with MATLAB's \ operator,

By writing only A\B, the user can solve square, over- or under-determined linear systems that are dense or sparse, for multiple data types. The arguments can even be scalars, in which case simple division is performed. In short, a large amount of linear algebra software is accessed via a single character! This contrasts with the software engineering tradition, where clarifying programmer intent would likely be considered more important.