Comments (5)
I agree with you that it'd be more welcoming and it has been a long term goal since the beginning of this project.
CoffeeScript was selected out of necessity, not out of love. When this project started in 2013, ES5 was just not up to the task and the code would have been a few hundred very ugly lines of code instead of 31 beautiful ones. I strongly believe that bugs hide better in ugly, long, convoluted code than beautiful, terse and straightforward code.
Over the years, JavaScript has absorbed 95% of CoffeeScript's good features and if I were to start Bottleneck now, I'd do it in modern JavaScript.
Version 2 is 99% ready to go, I just need to collect more feedback, fix a bug and do a final pass at the Readme.
Version 2 involved completely separating the internal engine from the rest of the module and making that engine asynchronous to the module itself so that I could then make a 2nd pluggable engine that uses Redis. The changes were so huge, I didn't want to lose all of the stability that modifying working and tested software provides me. I don't really believe in rewrites, I believe in slowly reshaping code until it becomes what I want it to become. Each small step of the way gets fully tested and debugged and the end result is always superior to a rewrite. For all these reasons, V2 is still in CS.
But now that all that is done, I'd be able to slowly start converting the code to JS, one method, one file at a time. There's still a couple of things in CS that are missing from JS, so the end result will be longer, uglier code, but I think that making it more approachable to beginners is probably worth it. But, at the same time, does it really matter considering that making any change to this library requires a deep understanding of JavaScript's complicated scoping rules, concurrency and distributed systems? The bar is already so high. Maybe, I'm not sure.
from bottleneck.
Congrats on v2!
from bottleneck.
@SGrondin, thanks for the very thought out reply. If you would like any help with the process after 2.0 is released, I'd be happy to do what I can.
from bottleneck.
I'll let you know!
from bottleneck.
Thanks @tjenkinson ! Lemme know what you think of it 😄
from bottleneck.
Related Issues (20)
- Invalid job status RECEIVED, expected DONE HOT 1
- task.apply is not a function
- Any correct ways to do rate limit 1000 per hour?
- `light.d.ts` not published in npm package
- Throw error for invalid settings
- Would it be possible to add a reset() method to clear state on local instances? HOT 1
- ReplyError: ERR SETTINGS_KEY_NOT_FOUND when use in Clustering mode with Redis 7.x HOT 8
- Is bottleneck still maintained? HOT 11
- recovering for a crashed service using redis
- bottleneck lost tracing data when using reservoir options
- Redis errors with ReplyError: ERR UNKOWN_CLIENT HOT 7
- dynamic schedule / retry HOT 3
- Long delay in Bottleneck.schedule execution in a distributed env HOT 1
- Is there a way to pass different options for limiters within the same group?
- Is there a way to read and write the reservoir for a given limiter?
- Long-lasting limiters with matching cardinality to app's users
- ERR SETTINGS_KEY_NOT_FOUND with redis 7.0.7 HOT 11
- user_script:201: attempt to compare number with nil
- Warning from vite about using eval
- Retry behaviour
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bottleneck.