speced / speced/respec

Change overload naming algorithm

Open
#2,527 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
806
Forks
434
Avg merge
1d 21h
Merged PRs (30d)
32

Description

We agree that current !overload-1 is weird, so I suggest a change:

interface mixin Foo {
  void overload(); // this should be just foo-overload
  void overload(short s); // foo-overload-s
  void overload(long s); // foo-overload-s-1
  void overload(DOMString str, object obj); // foo-overload-str-obj
};

Basically we name the operations by its argument names, and if some of them collides, then attach -(counter).

@marcoscaceres and @sidvishnoi, what do you think?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No implementation files or tests are named in the issue. Start by locating the current WebIDL overload naming implementation and its tests, then compare the existing output with the examples in the issue; done means argument-based names are generated and collisions receive sequential counters.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.