Comments (7)
Hi @Smoren,
Thank you for the feature suggestion. Give me some time to think about this and I'll get back to you. Sorry to make you wait.
Thanks for understanding.
Mark
from itertools-php.
Thank you for the answer.
I will wait for your decision.
from itertools-php.
Hi @markrogoyski,
I thought about the renaming of Stream
namespace and I have a very simple idea.
Maybe Iterable
or IterableWrapper
?
Iterable::of($smth)
->pairwise()
->toArray();
I think it looks nice :)
from itertools-php.
Hi @Smoren,
Thanks for your suggestion and continued interest to improve IterTools. I have not released a new version that has the Streams feature yet, so it is still possible to make changes.
However, I would argue that Stream is right name for this for three reasons.
-
The word "stream" gives the image of things flowing together continuously, like the fluent chaining of methods together. Since the stream repeatedly processes the data, it is a form of iteration, and fits in with the theme of IterTools.
-
This is a common name for this functionality. See Java Streams, C++ Streams API, numerous python stream libraries (streams, python-stream, streampy, Streams, python-streams, python-streaming , pyStream, pystreams), etc.
-
It differentiates it clearly from the looping constructs in the library. IterTools now provides tools to power loops, and tools to process iterables in a functional pipeline, consisting of a source, zero-or-more operations, and a terminal operation.
These are my reasons. I'm happy to continue to discuss if you like. Thanks.
Mark
from itertools-php.
Hi @markrogoyski,
Your arguments sound persuasive. I no longer insist on renaming.
Have you decided anything about including resources in IterTools?
from itertools-php.
Hi @Smoren,
I think resources is too big a topic. See here: https://www.php.net/manual/en/resource.php. Many things return resources, including network calls and protocols, database handles, etc.
Maybe narrow the scope to iterating files or something would help refine the idea and make it workable. I can immediately think of iterating lines of a file, and lines of a CSV. Anything else you would consider? And maybe the namespace is File
rather than Resource
to clearly indicate the intent?
Thanks,
Mark
from itertools-php.
Hi @markrogoyski,
I think namespace File
is a good idea. I'll think about it's methods and their implementation.
from itertools-php.
Related Issues (6)
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 itertools-php.