Apoorv Gupta
Apoorv Gupta

Reputation: 65

Is there a high-level language that can be compiled to shell and provides protection against the many hazards encountered in shell programming?

I've been told that Coffeescript and TypeScript can be used to write code that can be compiled into Javascript. They also provide some protection against the many eccentricities of JS and additional abstraction to improve productivity. Has anyone tried something like this for Shell? Is there some middle ground between writing in Shell and writing in Python, but without losing performance? Please don't hate me :)

Upvotes: 1

Views: 191

Answers (2)

Garrett M
Garrett M

Reputation: 103

I'd second the Haskell suggestion but with Turtle instead. It allows code that looks just like a shell script but is safely typed.

Upvotes: 1

Wieland
Wieland

Reputation: 1681

There's Joey Hess' shell-monad for Haskell (blog post, hackage page) that can be used to write code in Haskell that will generate a shell script.

Upvotes: 1

Related Questions