Skip to content

Improve Packet's API regarding readType() #174

@luke5542

Description

@luke5542

Instead of having several different names for read methods based on types, why not have just a single set of overloads on read based on the type and let the compiler decide? My thoughts are to use a similar declaration to how std.stream works:

void read(out byte x);

Perhaps even turn Packet into a full-on iostream and implement both InputStream and OutputStream. While this particular suggestion might not be the best right now (as the std.stream library is deprecated and they are looking for a replacement in Phobos), I still think at least having the improved declarations for read (and perhaps even write) would be a good step forward.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions