xstream icon indicating copy to clipboard operation
xstream copied to clipboard

Proposal: do away with the `xs` type alias

Open mightyiam opened this issue 8 years ago • 6 comments

At least I was confused when my IDE showed me that a stream was of type xs, as I was used to seeing Stream and MemoryStream.

Would it be possible to get rid of it?

mightyiam avatar Mar 31 '17 12:03 mightyiam

What IDE do this?

geovanisouza92 avatar Mar 31 '17 14:03 geovanisouza92

VSCode

mightyiam avatar Mar 31 '17 15:03 mightyiam

This is possible but it would be a breaking change. I sort of agree it would be nicer if xs.merge returned type Stream not xs, but it's an aesthetic preference. It could indeed add some confusion, but how often? (e.g. how often do TypeScript+VSCode users use highlighting to check the type plus would not understand what xs<number> is)

(The breaking change is that if someone is using xs as type, e.g. const myStream: xs<number> = xs.of(1,2,3), they would have to update their code.)

staltz avatar Apr 03 '17 14:04 staltz

It isn't that I did not understand. It seems suspicious. Not about aesthetics. About consistency of the names in the API.

If anyone is using xs as type, I'll submit a PR for them myself.

mightyiam avatar Apr 03 '17 14:04 mightyiam

If anyone is using xs as type, I'll submit a PR for them myself.

Gotta remember that maybe their project is not open source. ;)

staltz avatar Apr 03 '17 14:04 staltz

Gotta remember that maybe their project is not be open source. ;)

Kind of counting on that probability.

mightyiam avatar Apr 03 '17 14:04 mightyiam