DEV Community

vennny
vennny

Posted on

i created a language just for beginners to start making websites

I still remember the first time I had to print something in JavaScript and got told the answer was console.log(). Console? I wasn't writing a console app, I just wanted to print a value. It's a small thing, but small things like that add up fast when you're learning — you end up confused by naming choices, not the actual logic, and it makes you feel like you're missing something everyone else already gets.

So I built my own language.

E-script is a small language that compiles straight to regular JavaScript — no runtime of its own, no new engine, nothing exotic under the hood. It's really just JS with better naming and a few changes:

func greet(name) {
return "Hey, {name}!"
}

let ready = true and not false

if ready {
print(greet("world"))
}

  • print() instead of console.log()
  • and / or / not instead of && / || / !
  • String interpolation with {name} instead of concatenation
  • One-line functions with => for implicit returns

None of this is a new idea individually — plenty of languages have made similar choices. The point isn't that this is revolutionary, it's that it's mine, and it's aimed specifically at people who find JS's naming and error messages more confusing than the logic ever was.

The part I actually spent the most time on

Syntax sugar is the easy 20%. The part that actually matters for beginners is what happens when you get something wrong — and JS's default errors are rough if you're new (Cannot read properties of undefined (reading 'map') doesn't mean much your first week coding).

So E-script's compiler tries to say what's actually wrong, in plain language:

Line 1: expected a closing parenthesis ), but found the end of your code instead
Enter fullscreen mode Exit fullscreen mode

instead of a annoying token dump. That's the thing I think matters more than the syntax choices themselves.
A free course to go with it

I also built a free interactive course — 10 levels, starts from printing "hello world," gets harder gradually, instant feedback and hints along the way, no account required. If you want to actually try the language without installing anything, that's the fastest way in.

Try it

Feedback wanted

I built this solo, so I'm sure there are rough edges I haven't hit yet. If anything in the lessons feels confusing, or you find a case where the error messages still don't make sense, I'd genuinely like to hear about it.fr

Top comments (0)