[1] https://github.com/dotnet/Open-XML-SDK/releases/tag/v2.5
You'd simply run:
CURL url: "https://example.com" method: 'post
in an interactive system, that can either represent your shell, or your application code. We need --libcurl because UNIX is not an interactive environment, so there is an enormous abyss between runtime and compile time.(Syntax in this example from a Smalltalk-like environment I have been designing, should be understandable enough)
---
1: "An operating system is a collection of things that don't fit in a language. There shouldn't be one." — Dan Ingalls, 1981
Too bad we're stuck with UNIX/POSIX model - you could even take this idea of exported data structures and have the terminal represent data in the preferred users format instead of having tools like jq.
The only way is starting from scratch, with a novel approach and programming model.
The calling convention can be assumed to be the same as used by the OS/arch combination.
I'm talking about the status quo today, not how you can improve in a perfect world where everybody adopts a better way of doing things.
Implementing an half-baked Smalltalk layer on top of UNIX will not turn UNIX into a Smalltalk environment.
Invoke-WebRequest -Method 'Get' -Uri 'https://example.com'
And the response is a typed object:That you can pipe properly by piping objects not strings, e.g. :
Invoke-WebRequest -Method 'Get' -Uri 'https://example.com' | Select-Object -ExpandProperty Headers
Outputs: Key Value
--- -----
Age 438810
Vary Accept-Encoding
X-Cache HIT
Content-Length 1256
Cache-Control max-age=604800
Content-Type text/html; charset=UTF-8
Date Mon, 29 Jan 2024 15:08:42 GMT
Expires Mon, 05 Feb 2024 15:08:42 GMT
ETag "3147526947+ident"
Last-Modified Thu, 17 Oct 2019 07:18:26 GMT
Server ECS (nyb/1D15)Powershell has a high level object model but it doesn't make Windows itself anymore programmable and interactive, as a whole than zsh does for Linux. It is no Lisp Machine.