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

Should the default `SEXP` in `r_vector` be a typed vector of length 0 rather than `R_NilValue`?

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
cpp, r
領域
backend

調査の方向性

Start at r_vector's default construction and data_ handling, then inspect how default-constructed vectors currently behave when attributes are assigned. Evaluate the proposed typed, length-zero SEXP against the allocation and noexcept trade-offs, and validate that default construction supports attributes without requiring R_NilValue handling.

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

説明

i.e. to support things like https://github.com/r-lib/cpp11/issues/315 where you default construct the vector and immediately try and put attributes on it.

Would also simplify internal code that currently has to account for the possibility of R_NilValue as data_ quite a bit.

We'd have to write our own default constructor but I think that's totally possible?


A downside of this is that the default constructor would have to allocate and would no longer be noexcept or as "cheap", but I can't see that mattering much because you eventually allocate anyways?

主要言語
C++
スター
224
フォーク
52
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

r-lib/cpp11 のほかの issue

r-lib/cpp11 の issue をすべて見る

似ている issue

C++ の issue をもっと見る

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

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