Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Proposal improve variable naming

オープン
#970 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
c

調査の方向性

まず cJSON の構造と issue で提案されている名前を確認します。既存のフィールドを非推奨にして置き換えを導入するために、公開 API 全体と互換性の範囲を特定します。実装範囲を決める前に、合意済みの命名および移行計画ができていれば完了です。

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

説明

I used to be a big fan of short variable names, especially in the "short naming family," until I switched my IDE from legacy Turbo C/DOS to modern VSCode on Windows 7. Short, mixed-style naming is friendly to some auto-complete CLI tool or util, but it's terrible for spell checkers.

Image

Proposal: Improve Variable Naming

Keep the original names but mark them as DEPRECATED in version 2.x.x. Introduce new, clearer names and promote them as the standard going forward. Here’s a pseudocode example:

/* The cJSON structure: */
typedef struct cJSON
{
    /* next/prev allow you to walk array/object chains. Alternatively, use GetArraySize/GetArrayItem/GetObjectItem */
    struct cJSON *next;
    struct cJSON *prev;

    /* An array or object item will have a child pointer pointing to a chain of the items in the array/object. */
    struct cJSON *child;

    /* The type of the item, as above. */
    int type;

    /* The item's string, if type == cJSON_String or type == cJSON_Raw */
    /* Deprecated: use value_string instead. */
    char *valuestring;

    /* The value of value_string is the same as valuestring. */
    char *value_string;

    /* Writing to valueint is DEPRECATED. Use cJSON_SetNumberValue instead. */
    int valueint;

    /* The item's number, if type == cJSON_Number */
    /* Deprecated: use value_double instead. */
    double valuedouble;

    double *value_double;

    /* The item's name string, if this item is the child of, or is in the list of subitems of an object. */
    char *string;
} cJSON;
主要言語
C
スター
13k
フォーク
3.5k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

DaveGamble/cJSON のほかの issue

DaveGamble/cJSON の issue をすべて見る

似ている issue

C の issue をもっと見る

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

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