Skip to content
This repository has been archived by the owner on May 20, 2022. It is now read-only.

Class vs individual exports #1

Open
Andarist opened this issue Nov 2, 2021 · 1 comment
Open

Class vs individual exports #1

Andarist opened this issue Nov 2, 2021 · 1 comment

Comments

@Andarist
Copy link

Andarist commented Nov 2, 2021

I know the size of this package ain't big but I wonder... any particular reason behind choosing the class with only static fields? I've seen some of your other packages are using individual exports (for example the @tldraw/svg)

@steveruizok
Copy link
Contributor

My main motivation was that a utility class would let me use extremely generic names, like add and mul, which were initially difficult to identify when exported as individual functions. I ended up using import * as Vec throughout my code, which made me think I should just use a class. 🤷‍♂️

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants