Hey there, fellow devs!
We're at a crossroads with our open-source project, Webcrumbs, and would love your perspective. We're deliberating between JavaScript and TypeScript, and while we're leaning in a direction, we're curious to know the community's thoughts.
Some initial pros and cons that come to mind:
JavaScript:
Pros:
- Widespread adoption and massive community.
- No additional setup required.
- Immediate browser compatibility.
Cons:
- Dynamically typed, which can lead to potential type-related issues.
- Might lack some advanced features for larger applications.
TypeScript:
Pros:
- Static typing can catch potential type-related bugs during compile time.
- Can use all of JS's features plus additional TS ones.
- More structured, which could be beneficial for large projects.
Cons:
- Requires a compilation step.
- Might have a steeper learning curve for newcomers.
Which do you think would be better for Webcrumbs, considering the following features:
- Plugin Platform: Integrate and manage React plugins to extend functionality effortlessly.
- No-Code Admin Panel: Control every aspect of your website from a robust admin interface, no coding needed.
- Fully Customizable: Developers can tailor Webcrumbs according to specific needs.
- Open Source & Free: Webcrumbs is committed to being an open-source, community-driven project.
Additionally, if you believe in the project's mission, we'd love your support:
- Star the Repository: Show your support and help us gain more visibility by starring βοΈ the repository. Star Webcrumbs on GitHub.
- Join the Discussions: Your opinions and ideas matter. Participate in ongoing discussions or start a new one. Go to Discussions.
- Check Open Issues: See what issues are open and where you can contribute. View Open Issues.
- Read the Contributing Guide: Get all the information you need about how to contribute. Read Contributing Guide.
Looking forward to your insights! π‘
Top comments (7)
I recommend either TS with types greyed out (color-wise) in the IDE (so they don't clutter reading of the JS code), or JSDoc TS. Types are especially important for OSS libraries that others use and rely on, but beware that you might have to create some complex typings from time to time (can be time consuming, hence the DHH drama), to give your API consumers the best experience.
I think one point simply asks for static typing: the plugin interface. However this would still leave the question open JSDoc or Typescript. I think deployment is simpler when using JSDoc because it does not require a build step. But Typescript is probably easier to maintain than proper JSDoc (with its rather cumbersome syntax for more complex stuff)
Really appreciate. Cheers
Apart from the DHH drama I think the tension really is TS vs TS JSDoc.
See my comments here.
Weβll get there! Thanks, friend
Hey!
Typescript has become almost a standard nowadays. Especially if you are providing any library that other developers will use. Moreover, the typescript cons you mentioned are not so critical, let me comment on them:
Another disadvantage of typescript that you did not mention is that if you take typing seriously, you will have to think through twice as many things on the project and this will require additional costs, of course. Now itβs up to you to decide whether itβs worth investing in it.
Happy coding! :)
Thank you, my friend.