Share your Programming Language Jam submissions here!

← Back to all posts
Parseltongue
brianjenkins94 (11)

Team Parseltongue:

Pitch your language! Describe the main idea behind it, sample code, design decisions, technical trade-offs, roadmap, and whatever else you think is relevant (we support markdown)

The idea behind Parseltongue was to take the readability and simplified syntax of Python and make it available in JavaScript/TypeScript.

In terms of design decisions, we decided to use the TypeScript Compiler API by way of a library called ts-morph which enabled us to directly manipulate the TypeScript AST so that we could avoid the undertaking of creating a parser and a lexer and a binder... etc.

The primary technical tradeoff in our design and implementation was that we knew we were going to break labeled statements. As Python does not have labeled statements and as I've never used labeled statements in my life, we saw this as an inconsequential tradeoff.

Initially we had planned on taking more from Python than we ended up with. We also wanted to see if there was anything we could do from a language standpoint that would allow for us to encourage immutability, discourage side-effects, while maintaining ecosystem interoperability and removing some of JavaScript's footguns while we were at it.

Original Pitch Slidedeck

Naturally, scope needed to be reduced in order to fit the time constraint.

Add the main source repl. If it's split between multiple projects, add all of them describing what each does

https://repl.it/@airwinfi/Parseltongue

Ideally, judges can simply click run and be able to interact with your language. If that's not possible, then please add instructions on how judges can run your language and try a sample program

The best way to play with the language is on the playground that we created here:

https://cireneirbo.github.io/Parseltongue

You can also run the tests in the repl by executing npm start from a shell.

Commentshotnewtop
AmazingMech2418 (941)

By the way, Python does have labeled statements... They just aren't as common as in TS or other languages like Swift or Kotlin.