4 ms·
chat = RubyLLM.chat Is ambiguous, though. You can't know if it's an assignment or creating a new object. I don't think that's more readable.
by maleldil 2y ago
chat = RubyLLM.chat
Is ambiguous, though. You can't know if it's an assignment or creating a new object. I don't think that's more readable.
- shellac 2y agoWhat do you mean by 'assignment or creating a new object'? It assigns chat to ... whatever RubyLLM.chat returns. Do you mean the function could have a clearer name?
- maleldil 2y agoIt's unclear whether `chat` is a field/property/member of `RubyLLM` or a method being called.
- nickisnoble 2y agoRuby only has methods and everything is an object. So… that solves that.
- caseyohara 2y agoPerhaps to you, but anyone that’s ever worked with Ruby knows that there’s no such thing as fields/properties/members in Ruby. There are only methods. Parentheses are optional for method calls.
- xutopia 2y agoRubyists understand it perfectly. It's common practice for us.