Consider `implements MyInterface` syntax
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- ruby
- Domain
- developer-experience
Research direction
Start with the proposed Notifier and SlackNotifier example and review the referenced Rubydex/RubyLSP compatibility concerns. Determine whether the project should adopt implements as an alias for include, what tool support would be required, and how completion would be validated.
Written by the indexing model from the issue text.
Description
Would we want this?
module Notifier
interface!
# ...
end
class SlackNotifier
implements Notifier # ✨
# ...
end
The implementation would literally just be Module.alias_method(:implements, :include)
Pros:
- Reads really nicely, feels native
- Tools can instantly know that
Notifieris an interface, without needing to resolve it first (it likely lives in another file)
Cons:
- Would need special support in Rubydex/RubyLSP. It wouldn't be understood by other tools by default.
- Most tools that handle Ruby understand module inclusion, so they'd know the interface's methods become available on the class. They wouldn't know that about this
implementskeyword without having bespoke support built for it.
- Most tools that handle Ruby understand module inclusion, so they'd know the interface's methods become available on the class. They wouldn't know that about this
Originally posted by @amomchilov in https://github.com/Shopify/type_toolkit/pull/2#discussion_r2850115519
- Dominant language
- Ruby
- Stars
- 3
- Forks
- 5
- Avg merge
- 8d 23h
- Merged PRs (30d)
- 8
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Shopify/type_toolkit
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Shopify/type_toolkit#4 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Shopify/type_toolkit#45 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Shopify/type_toolkit#20 ·
-
good first issue
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Shopify/type_toolkit#11 · 3 comments ·
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 52/100
Shopify/type_toolkit#10 ·
All issues in Shopify/type_toolkit
Similar issues
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
TheOdinProject/curriculum#31408 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bensheldon/good_job#1816 · 5 comments ·