winglang / wing

A programming language for the cloud ☁️ A unified programming model, combining infrastructure and runtime code into one language ⚡
https://winglang.io
Other
5.01k stars 197 forks source link

What APIs should be included in the standard library? #1645

Closed Chriscbr closed 5 months ago

Chriscbr commented 1 year ago

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, and util. 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:

- 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 - serialization
github-actions[bot] commented 1 year ago

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. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!

Chriscbr commented 1 year ago

Initial set of APIs added in this RFC: https://github.com/winglang/wing/pull/2837/files

github-actions[bot] commented 5 months ago

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. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!

staycoolcall911 commented 5 months ago

Chatted with @Chriscbr and we decided to convert this issue into a discussion, since it is not really actionable