[http] Request and Response's `new` method is reserved in many languages, inconsistent with sockets.

オープン 初心者向け
#961 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
75/100
issue の種類
リファクタリング
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
wasm
領域
api

調査の方向性

まず、リンクされている Request と Response の定義がある proposals/http/wit/types.wit を読み、次にリンクされている tco-socket と udp-socket の定義がある proposals/sockets/wit/types.wit とコンストラクターの命名を比較します。HTTP コンストラクターが new ではなく create を使用し、socket インターフェースと一貫していれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Languages like Java and C++ disallow static methods named new, so methods like new on Request will have to be modified to something like new_. That's fairly ugly, so a better option would be something like create, which isn't a reserved word in any mainstream language that I know of.

https://github.com/WebAssembly/WASI/blob/39c11a76958d015ace3f1bf68500057a28c7837f/proposals/http/wit/types.wit#L308

new is also inconsistent with tco-socket and udp-socket which already use create: https://github.com/WebAssembly/WASI/blob/39c11a76958d015ace3f1bf68500057a28c7837f/proposals/sockets/wit/types.wit#L195

So it'd be both a translation and consistency win to rename new to create.

主要言語
Rust
スター
5.8k
フォーク
339
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

WebAssembly/WASI のほかの issue

WebAssembly/WASI の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。