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)
- Compiler error running on Node 20.12 (works in 20.11.6) in napi-intl.h when calling napi_status napi_create_external_buffer HOT 2
- The different of process.next() between MacOS and Linux
- Define node::StreamBase's "onread" property as a JavaScript accessor
- comments in .env files are parsed as values HOT 3
- test runner runs beforeEach or test case before "before hook" finished HOT 2
- Async iteration over tcp stream produces more chunks
- FS watch memory leak on Windows HOT 2
- NodeJS v22 not working with Powershell or Windows Powershell HOT 1
- Experimental Test Coverage throws "cannot read properties of undefined (reading: line)" HOT 1
- Passing `stdin` of child process A to `stdout` via `stdio` of child process B, yields "invalid child stdio type" when using `spawnSync`
- Programmatic SEA blob generation API
- Replacement for `minimatch` HOT 2
- The order of code execution is wrong HOT 2
- `Readable.flatMap` concurrency isn't working as expected HOT 3
- Maglev on x64 causes segmentation fault while running TypeScript HOT 31
- the npm did not include when install the version 22 through choco HOT 2
- remove the warning about performance hit in --experimental-detect-module HOT 22
- tiny startup time regression HOT 2
- revert the highwatermak increase HOT 23
- CITGM failures in node 22
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.