←back to thread

311 points todsacerdoti | 1 comments | | HN request time: 0.225s | source
1. formula1 ◴[] No.46235401[source]
One issue with package naming is competition. One of the great things about OSS or software in general is people can take inspiration from other projects that do the same thing. Personally I've ran into deciding which casting library to use

- runtypes - https://github.com/runtypes/runtypes

- zod - https://zod.dev/

- ajv - https://ajv.js.org/

AJV and runtypes use the naming convention that the article suggestions. It's named is derived from how it's used. Zod on the other hand seems to come from left field.

Personally, I built a simple caster called "ShallowCaster" before choosing to move to a library as things got move complex but I think a problem is that as competition increases the "generic" naming becomes more difficult to find.

I suppose an option is to include the author name for each package such as "json casting from google" or "@google/json-casting" this way all packages can use the descriptive naming while not conflicting