Extract Socket constants in separate file.#6717
Extract Socket constants in separate file.#6717straight-shoota wants to merge 1 commit intocrystal-lang:masterfrom
Conversation
8de9343 to
8755a3a
Compare
`Socket::Address` and `Socket::Addrinfo` conceptually don't dependent on `Socket`. The shared constants and lib includes are extracted to common.cr to separate these concerns more cleary.
8755a3a to
56e3b97
Compare
|
I dont understand. If they're common constants, that they'll be included anyway, and they're still named Socket::X then I expect them to be defined in Can we avoid stylistic/opinion changes, and concentrate on fixing actual issues in Socket? |
|
This is not about style, it is about separation of concerns. I'd like This PR is in preparation for refactoring the entire socket API. In the process I found it was much easier to separate individual pieces of code into separate files instead of having the main type + some common stuff in the main file. This PR is not an integral part of the refactoring, that's why I published it separately. But it makes refactoring easier. |
|
So, where do we want to go with this? 18 months later it didn't seem to have been a pain point for anybody given the activity here... |
|
Closing stale PR. |
Socket::AddressandSocket::Addrinfoconceptually don't dependent onSocket. The shared constants and lib includes are extracted tocommon.crto separate concerns more clearly.