Comments (2)
Thanks for pointing out this and starting the discussion.
1 concern is I dont know what it means to me.
It doesn't mean anything for keyword arguments. The parameter names for positional arguments make some sense I think. It can be used for documentation. We often want to refer to the arguments in the documentation.
Your concern makes sense because keyword arguments can be referred safely by their keyword names.
2 concern is code drift.
There is no one-to-one correspondence between the parameter names in method definitions and the names in RBS. We can give more precise/better definitions in RBS, like the following example.
# def foo: (foo: String, bar: Integer) -> void
# | (baz: String) -> String
# | (**String others) -> untyped
def foo(**opts)
end
3 concern is correctness.
They are the same.
I'm thinking of just removing var names from keyword arguments. I don't think it causes serious problems, but agree that we haven't found good usage yet.
from rbs.
Hello @soutaro,
Thank you for your response. I think the biggest question I had was why and that was answer. The main reason is for documentation. The name of the variable can be documented but it has no impact on the code or signature. This would help in a a code hinting system where the comments would not need to be parsed. Your example of def foo
is a very informative as well.
Should I leave this issue open to track removing keyword argument var names?
Thank you once again for your time,
Dictated but not reviewed,
Becker
from rbs.
Related Issues (20)
- Proposal: making `Class` and `Module` classes generic -- `Class[I]` and `Module[I]` HOT 9
- Feature proposal: Multiple error on `rbs validate` HOT 1
- stringio should be a stdlib, but it's in `core/`
- Handling Classes created with Data#define HOT 1
- `RBS::Prototype::Runtime#block_from_ast_of` is dominant in terms of execution time.
- More improved support for `Struct` and `Data`.
- Migrate rbs prototype command information from soutaro/steep to ruby/rbs HOT 1
- Add in `&untyped` HOT 3
- Inconsistencies and Holes in with Grammar documentation HOT 4
- Support class redefinitions in runtime for rbs test mode HOT 7
- Somehow add metaprogramming to type parameters HOT 1
- Add Support for Non-Symbol Keyowrds
- Add support for `__END__` in rbs files HOT 1
- Add support for `alias $x $y` HOT 2
- Add support for `undef` HOT 2
- Thread/Fiber/Kernel#raise is incorrectly labeled HOT 3
- ConditionVariable#wait signature return is incorrect HOT 1
- TCPServer.new type signature incorrect
- `Proc::new` is the one that take the block, not `Proc#initialize`
- rbs/test: stack level too deep when calling super from prepend HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rbs.