Syntax Basics
Devlish programs read like structured English. Each line is one statement, and the language normalizes human-readable names into consistent identifiers.
Statements and Comments
Section titled “Statements and Comments”One statement per line. Blank lines are allowed. Comments start with #.
# This is a commenttotal cost equals base price plus tax
# Blank lines separate logical sectionsPrint total_costAssignment and Definition
Section titled “Assignment and Definition”Use equals to assign a computed value. Use is to define a term.
# Assignment: calculate and storetotal exposure equals liability_cap plus deductiblestatus equals "pending"
# Definition: declare what a term meansliability cap is the maximum amount payabletermination notice is days required before terminationVariable Naming
Section titled “Variable Naming”Multi-word names are written naturally and normalized to snake_case internally. Both forms refer to the same variable.
Ask "What is your name?" as user name# Stored as user_name internallyPrint user_nameMath Operators
Section titled “Math Operators”Devlish supports both English words and symbols for arithmetic.
total equals base plus surchargedifference equals revenue minus expensesarea equals width times heightrate equals total divided by count
# Symbol equivalentstotal equals base + surchargearea equals width * heightrate equals total / countComparison Operators
Section titled “Comparison Operators”Comparisons are used in conditions and validation statements.
If score > 70: Print "passed"
If retry_count >= 3: Fail with "Too many retries"
If status equals "approved": Print "ready"Available comparisons: >, <, >=, <=, equals.
Boolean Operators
Section titled “Boolean Operators”Combine conditions with and and or.
If score > 70 and status equals "active": Print "eligible"
If region equals "US" or region equals "CA": Print "North America"String Operations
Section titled “String Operations”Strings use double quotes. Concatenation uses plus.
greeting equals "Hello, " plus user_namefull path equals directory plus "/" plus filenameString helpers are available for transformation:
upper equals uppercase user_namelower equals lowercase user_namecleaned equals trim raw_inputslug equals slugify title