[PPC0030] - Clarifications on `use overload` interaction

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
ドキュメント
明瞭さ
説明が足りない
活発さ
静か
技術スタック
perl

調査の方向性

Start by reading the PPC document and the linked perl5 pull request, then review how use overload currently treats equ and ===. Done means the interaction is resolved as a clear specification decision and the PPC document explains whether these operators are independently overloadable or defined through defined and eq.

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

説明

The PPC document doesn't actually talk about use overload at all.

In the course of implementing it (https://github.com/Perl/perl5/pull/24304), currently I have fully created an overload category for the equ and === operators, allowing a class to use overload equ => ... to specify its overloading behaviour here.

But I wonder if this should be considered correct, or not. We say that the equ operator's behaviour can be explained in terms of some defined checks and the eq operator. While we allow the eq operator to be overloaded, we don't allow defined to be.

I wonder if therefore, we should say that equ (and related) are not independently overloadable, but instead are just implemented in exactly these terms - a defined check first that cannot be overridden, followed by a possibly-overloaded eq check.

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

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

Perl/PPCs のほかの issue

Perl/PPCs の issue をすべて見る

似ている issue

Perl の issue をもっと見る

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

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