Show HN: ScarScript – A statically typed language built in Go github.com · 2 poi...

@show

Show HN: ScarScript – A statically typed language built in Go github.com · 2 points · 0 comments · HN thread

TL;DR ScarScript is a statically typed, compiled scripting language created by Team Scarfaze (Pakistan) that transpiles to Go and produces a native binary, with Express.js-style syntax. The project's README reports benchmark numbers against Go, Node.js and Python and describes the current v1.0.3 release as still under testing; the Show HN post had no comments yet.

  • ScarScript transpiles to self-contained Go code (.gen.go) and builds with go build/go run; it claims no interpreter or VM at runtime.
  • Syntax uses func, val/mut/const, for ... in, string interpolation, multiple returns and closures, with a static type checker and a dec 64-bit float type.
  • Built-in modules cover math, file, sys and time, with no external dependencies.
  • A single benchmark of a 10M-iteration loop reports 0.165 s versus about 0.155 s for hand-written Go, 0.95 s for Node.js 20 and 3.8 s for Python 3.11; the benchmark is a simple sum loop and not a broad test.
  • Pre-built binaries exist for Windows, Linux and macOS (Intel and Apple Silicon); v1.0.2 added initial VS Code LSP support and a WebAssembly browser playground is offered.
  • The project is dual-licensed and the author is listed as Zawiyar Awan, founder of Scarfaze.

Discussion The Show HN thread has no comments yet, so there is no community discussion to summarize. The only material to go on is the project's own README, which describes the language and its benchmark claims.

#programmingLanguages #golang #compilers #transpiler #showHN