finds.dev← search

// the find

crossoverJie/gscript

★ 223 · Go · BSD-3-Clause · updated Nov 2022

💪🏻This is a statically and strongly typed language written in Go.|GScript 是用 Go 编写的静态、强类型的脚本语言。

GScript is a statically-typed scripting language implemented in Go using ANTLR4, with syntax borrowing from both Java and Go. It targets developers who want Go-like semantics (goroutines eventually, closures now) in a lighter scripting form. The last commit was November 2022, so this is effectively abandoned at alpha.

The grammar-first approach using ANTLR4 is the right call for a learning project — the generated parser/lexer is in the repo and the .g4 source is there to read. Closures with proper variable capture work correctly based on the examples, including the shared external variable vs. per-closure inner variable distinction. Operator overloading is implemented cleanly as a convention (functions named 'operator' with the symbol appended) rather than special syntax. The HTTP server embedding is a genuinely useful differentiator over most toy languages — running a web server from a .gs file actually works.

Dead since 2022 with no package manager, no module system, and no way to import your own .gs files — you get one flat script or nothing. The 'goroutine' goal listed in the introduction was never implemented; the feature list checkbox is empty and there's no sign of it in the codebase. Error messages from the interpreter appear to be raw Go panics in many cases, which makes debugging broken scripts painful. The standard library is thin and implemented partly as native Go functions and partly as .gs files in /internal, creating an inconsistent mental model for what's built-in versus what's just a bundled script.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →