5 ms·
Go has a fast enough compile speed I feel like you could syntactically sugar it to be a command line.
by XorNot 4mo ago
Go has a fast enough compile speed I feel like you could syntactically sugar it to be a command line.
- chiply314 4mo agoYeah but its not scripty enough and has not enough easy stuff build in.
- hiyfsch 4mo agohttps://www.tcl-lang.org/ https://www.tcl-lang.org/ Many people have made micro Tcl’s too if you want something even lighter. It has a built in subst command no need for a template engine!
- graemep 4mo agoWhy would you compile it each time? You would compile the binary once and the use it. This is what Go equivalents of this already do (e.g. Hugo).
- XorNot 4mo agoBecause a shell is an ergonomic programming language. If you compile a binary then you're implementing another programming language interpreter. AFAIK the Go jupyter kernel does something like this but it sequentially links previous compilation results to the current cell. Memory use is probably not great for a shell care though (since each linked Go library is a whole separate Go runtime).