Python
Jump to navigation
Jump to search
Python is a popular scripting language that was first released in 1991. This article compares Python to MiniScript, and may be useful to people coming to MiniScript with a background in Python.
Contents
Similarities
Data Types
List Syntax
Map Syntax
Variable Scope
Object-Oriented Programming
Differences
Language Scale
MiniScript is a considerably smaller language by any reasonable measure. For example, the following table compares Python and MiniScript on C/C++ source code lines, source code files, number of data types, and number of standard intrinsic functions, as of 2021 (source).
Python | MiniScript | |
---|---|---|
Source Lines | 661,775 | 13,752 |
Source Files | 718 | 46 |
Data Types | 34 | 6 |
Intrinsics | 69 | 53 |
Function Invocation
While functions in Python are always invoked by putting parentheses after a function reference, in MiniScript, such parentheses can be omitted when (1) the function call is the entire statement, or (2) there are no arguments.
Python | MiniScript |
---|---|
import random x = random.uniform(0,1) print(x) |
x = rnd print x |