Syntax Basics
Devlish is a programming language written as a controlled subset of English. Its phrases have specific meanings: the compiler reads explicit statements rather than interpreting an open-ended natural-language request. This makes a program readable while keeping its execution defined by the code.
This page introduces how to read and write those statements: comments, assignment, names, arithmetic, and conditions. Start here before the topic pages, or follow the Quick Start to see them in a small working program.
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_nameHelper snippets below show expressions only. Use them after equals, Print, or Respond with in a program.
Math Operators
Section titled “Math Operators”Devlish supports both English words and symbols for arithmetic.
base plus surchargerevenue minus expenseswidth times heighttotal divided by count
# Symbol equivalentsbase + surchargewidth * heighttotal / 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.
"Hello, " plus user_namedirectory plus "/" plus filenameString helpers are available for transformation:
uppercase user_namelowercase user_nametrim raw_inputslugify title