Replies: 4 comments
|
Hi, This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. |
0 replies
|
Initial set of APIs added in this RFC: https://github.com/winglang/wing/pull/2837/files |
0 replies
|
Hi, This issue hasn't seen activity in 90 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. |
0 replies
|
Chatted with @Chriscbr and we decided to convert this issue into a discussion, since it is not really actionable |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
What are the APIs in Wing's standard library?
It's possible to access most Node APIs and third-party library functions through extern functions. But there should also be a selection of APIs that come pre-included with Wing.
Today, we already have several built-in modules like
http,math, andutil. What set of principles should we use for deciding which APIs to include vs exclude? Offering APIs in Wing has the upside of providing a better experience for first time users (since they don't need to write JavaScript or install third party libraries), but it also increases our API surface area that needs to be maintained.Common standard library features in other programming languages for inspiration:
Details
- IO (input/output), stdout/stderr/stdin, argument parsing - random (generating numbers, shuffling, etc.) - hashing / cryptographic functions - debugging functions - error types? - regular expressions - file system - networking (fetch? sockets? IP utilities?) - OS (number of CPUs, platform, creating temporary files/directories) - path manipulation - URL manipulation - timers (sleep, set timeout, time elapsed) - reflection - meta (current filename or directory name?) - processing (forks, PIDs) - threading - string formatting - stack traces - type converting utilities, type narrowing utilities (isInt...) - iteration utilities (permutations, zipping, cycles, ...) - FFI - math - logging - serializationAll reactions