Hacker News new | ask | show | jobs
by liotier 931 days ago
Why a whole language rather than a library that could just as well abstract the cloudy infrastructure and expose its data structures as "first class citizens" ?
3 comments

The short answer is that there are things we cannot do with existing languages, such as our inflights and their connection to preflights. The full version is here: https://www.winglang.io/docs/faq/why-a-language
> Why a whole language rather than a library that could just as well abstract the cloudy infrastructure and expose its data structures as "first class citizens" ?

"Very cool, but what here cannot be done by a library or compiler extension?

In existing languages, where there is no way to distinguish between multiple execution phases, it is impossible to naturally represent this idea that an object has methods that can only be executed from within a specific execution phase (or within certain scopes of the program). You are welcome to read more about it here (including code samples that show the same app built in Wing vs. other solutions)."

https://github.com/winglang/wing#very-cool-but-what-here-can...

I'm not convinced one "cannot" do it with an existing programming language, as the link states.

I agree that the ergonomics of a languaged planned for that is better. But the argument that it's *only* possible with a purposeful language doesn't hold, in my opinion.

Afaik, the AWS CDK allows to express both preflight and inflight in JS, Python, and others, and it works well. Again, the CDK gives an arguably worse experience, but not "impossible"...

Pulumi has the Automation API [1] which is a step in that direction.

[1] https://www.pulumi.com/docs/using-pulumi/automation-api/