#Golang is replacing #PHP and #Bash for quick and dirty one-time scripts for me in many cases (especially where memory consumption is of importance).
It's pretty awesome that a compiled language is a good replacement for scripting languages.
I remember in ye olde times where the distinction between compiled and interpreted used to be much larger, but just running "go run main.go" is not that different from "php script.php" or "bash script.bash".
Dieser Beitrag wurde bearbeitet. (1 Monat her)
Larry Garfield
Als Antwort auf Dominik • • •Any pointers on how to best leverage that vs bash? Bash's only real advantage is if most of what you're doing is shell commands, it's hard to beat for simplicity. How does that work in go? Basics like change dir, grep, pipe to another command, list contents, etc.
2/3 of my bash scripts are wrapping ugly composer commands. How would that work?
Dominik
Als Antwort auf Larry Garfield • • •@Crell If you're just wrapping external commands with an if or two thrown in there, bash is still the best.
Though I sometimes use php for that because passthru() makes it really easy.