Movatterモバイル変換


[0]ホーム

URL:


WOLFRAM

The Wolfram Language:
Fast Introduction for Programmers

Show additional notes for:
All sections 
Get Started

Symbolic ExpressionsVideo Version

Everything in the Wolfram Language is a symbolic expression.

Notes for Java programmers:

Symbolic expressions provide an extremely general way of representing data in a uniform, tree-like structure. They add a high level of flexibility in programming, allowing manipulation of both structure and content. Java does not have symbolic capabilities, although basic features may be available using third-party libraries.

Notes for Python programmers:

The Wolfram Language's symbolic expressions provide an extremely general way of representing data within a uniform tree-like structure. They add a high level of flexibility in programming, allowing manipulation of both structure and content. Python does not have built-in symbolic capabilities, but you can construct arbitrary expressions with Wolfram symbolic syntax in Python usinglanguage.wlexpr from theWolfram Client Library for Python.

All symbolic expressions have the same fundamental structure:head[arguments]

Notes for Java programmers:

An expression'shead identifies the type of data or operation being represented. Unlike in Java, which is statically typed, a Wolfram Language expression's head may transform during evaluation.

Notes for Python programmers:

A Wolfram Language expression'shead identifies the kind of data or operation being represented and may be transformed at any time during evaluation. Every Python object has a declaredclass that cannot be changed.


The argument to a function can be any symbolic expression:

In[1]:=
Out[1]=

The Wolfram Language is fully symbolic, so "undefined variables" can always just stand for themselves:

In[1]:=1
Out[1]=

Notes for Java programmers:

Uninitialized Java objects and primitives generally take on default values ofnull,0 orfalse, and attempting to use such variables can causeNullPointerException or other errors to be thrown.

Notes for Python programmers:

The Wolfram Language's symbolic expressions enable programmers to seamlessly use undefined variables as symbols in their computations. Unassigned variables in Python are considered "undefined," and attempting to use an undefined variable causes aNameError.


FullForm always shows the underlying structure.
Head always gives the head of anexpression;Length gives the number of arguments.



[8]ページ先頭

©2009-2025 Movatter.jp