Hacker News new | ask | show | jobs
by ramesh31 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" ?

"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...

1 comments

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"...