Languages
AVM Studio supports three languages for writing Algorand smart contracts, each with different trade-offs.
Language Comparison
PuyaTS
Puya
TEAL
Base Language
TypeScript
Python
Assembly
Learning Curve
Easy
Easy
Hard
Type Safety
Yes
Yes
No
Best For
Most projects
Python devs
Optimization
Algorand TypeScript (PuyaTS)
PuyaTS is the recommended language for most developers. It provides a familiar TypeScript-like syntax with full type safety and excellent tooling support.
Key Features
- TypeScript syntax - Familiar to web developers
- Full type safety - Catch errors at compile time
- Decorators - Clean method and state declarations
- IntelliSense - Auto-completion and inline docs
When to Use
- You're comfortable with TypeScript or JavaScript
- You want the best developer experience
- You're starting a new project
Algorand Python (Puya)
Puya allows you to write smart contracts using Python syntax. Great for developers already familiar with Python.
Key Features
- Python syntax - Clean, readable code
- Type hints - Static typing via annotations
- Class-based - Object-oriented contract structure
- Familiar patterns - Pythonic idioms work naturally
When to Use
- You're more comfortable with Python than TypeScript
- You're porting existing Python code patterns
- Your team has Python expertise
TEAL
TEAL (Transaction Execution Approval Language) is Algorand's low-level assembly language. It's what all contracts ultimately compile to.
Key Features
- Direct control - Full control over opcodes
- Maximum optimization - Hand-tune for performance
- No abstraction - What you write is what runs
When to Use
- You need maximum optimization
- You're debugging compiled output
- You're learning how the AVM works
Warning
Writing TEAL directly is not recommended for most projects. Use PuyaTS or Puya for productivity and safety, then optimize specific sections in TEAL if needed.
Which Language Should I Choose?
Start with PuyaTS if:
- You're new to Algorand smart contracts
- You want the best tooling and error messages
- You're building a production application
Choose Puya if:
- You're more comfortable with Python
- Your team already uses Python
- You're porting existing Python patterns
Use TEAL only if:
- You need to optimize specific code sections
- You're debugging or learning the AVM
- You have very specific low-level requirements