Language Tour
This page is for people who already program
If you have never written code before, start with Choose your path and Lesson 1 instead. This tour assumes JavaScript, C, or Python familiarity.
Echo is interpreted. You declare types on variables and parameters; the runtime checks them when values are bound. Blocks use braces. If you know JavaScript, C, or Python, the surface should look familiar — the failure rules and scope rules will not.
This page is a first-hour map for experienced programmers. For a minimal file → run walkthrough, use Quick Start. For a teaching path, use Learn Echo.
echo
name: str = "Echo";
version: int = 1;
fn greet(user: str) {
say("Hello, ${user}!");
}
greet(name);
say("Version:", version);Facts that matter early
- Not compiled. Files go lexer → parser → analyzer → interpreter.
- Declarations and parameters need types. A
returnrequires a return type annotation on the function. - Abort is the default on failure; inquiry and
*Ortwins cover expected absence — see Failure model. - Classes and interfaces ship:
new { ... }fields, methods, type methods, unbound methods, optionalimplements. Class inheritance does not. - Scripting helpers: HTTP (host-gated), URL / Base64, regex, UTC dates. List prelude names with
elang builtins. - Current package version: 2.2.1 (see Known Limitations for the feature timeline).
- Comments:
echo
// single-line
/*
multi-line
*/Common mistakes
Missing ;:
echo
name: str = "Echo"
say(name);Missing braces (Python-style bare body):
echo
if true
say("yes");Use:
echo
if true {
say("yes");
}