Comments (6)
here's one of my rants on the topic http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html
from node.
@rvagg great counter points -- I'm having trouble applying both those experiences into a cohesive philosophy -- it seems like we were (are) still trying to figure streams out, so they were a little too unstable to be in core. @rvagg while you seem to be more on the no-core side of things, where do you draw the line -- is it just at fundamental data types? are streams not data types and so this doesnt apply?
from node.
The lesson on "primitives" that we've learnt in the level* ecosystem is: a primitive is only a primitive if it can't be built outside of core ontop of existing core components. i.e. primitives exist only as a means to build additional features, if they are just nice-to-have then they are sugar and not a primitive. We expect the core to be only large enough to suppose those features absolutely needed and if you can construct a feature ontop of those features then it doesn't belong in core. For example, the createWriteStream()
we have in LevelUP is simply made up of a combination of put()
and batch()
operations, those are the primitives here and we've even found from experience that there are multiple ways to write a WriteStream for level* and the one you choose depends on your use-case (e.g. fast initial bulk loads vs ongoing slow writes, vs fstream-compatible writes, etc.). So we're pulling the WriteStream implementation out of core completely and letting userland decide how to best implement it.
In the case of Node.js streams, we can all pretty much agree that we've landed at a decent abstraction that makes for workable, composable code, but that doesn't make something a "primitive" by any means, even if everyone is using the same abstraction.
Even if 99% of the WriteStreams used on top of LevelUP were the same library, it still wouldn't make sense to push it into the core. We keep core small so the innovation, experimentation, etc. can happen elsewhere. There's also nothing stopping people from bundling opinionated level* packages that have all of their favourite components already built in. Same goes for Node.js core.
from node.
It doesn't seem like there is any action to take from this issue, and @rvagg's comment provides an excellent answer. Can this be closed?
from node.
@cjihrig I'm still working on a response, but we could probably move back over to #55.
from node.
Closing this in favor of #55 for the time being.
from node.
Related Issues (20)
- Worker with `inspector.waitForDebugger()` cannot be terminated
- Nodejs spends a lot of time when using replace and regular expression replacement. HOT 2
- Node Red startet unter Node.js 18.20.2 nicht (Windows 10) HOT 3
- Node 21.7.3 breaks `spawnSync` with error EINVAL HOT 2
- Does node 20.x fully supports cgroups v2 ? facing memory celling problem Kubernetes cluster HOT 3
- Node v20.12.x TypeError: fetch is not a function HOT 3
- Pass node 18.x branch tests when compiled against shared openssl 3.2 HOT 3
- Organize and Simplify the 'Node.js feature requests' Project HOT 1
- fs.realpathSync() and fs.realpath() are returning different results for attached cloud drive HOT 2
- docs: Unsafe example for converting a `message.url` to an `URL` HOT 10
- util.styleText isn't drawing a frame HOT 1
- 'internal/bootstrap/realm' is not exposed with the --expose-internal flag HOT 1
- Reorganize Node Tests HOT 3
- async error inside before won't cause test error HOT 1
- REPL: .editor tab completion and formating
- test_runner: option to skip tests from command-line HOT 4
- Integrate prototype REPL into primary NodeJS HOT 7
- Cross-compilation bug when compiling for ARM64 on a non-ARM64 host
- Minimatch dep update fails HOT 2
- ESLint dep update fails HOT 3
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 node.