Comments (3)
This is great, thank you for taking the time.
I have a draft API sketched out for a v2 that I am very eager to get around to. I think as part of that, when all is said and done, will be a push to either merge into core or push for default extension like json.
Could you maybe justify some of the design decisions here? I would like to know why the hierarchy is the way it is, to better understand your experience and use that to inform the next phase.
Once I'm happy with the API I'll post it for feedback and hopefully arrive at some consensus to then move forward with implementation and testing.
from ext-ds.
Could you maybe justify some of the design decisions here? I would like to know why the hierarchy is the way it is
That's a good question. I guess I wanted to group the methods on each class a little better. That being said, it still doesn't help my actual use case, which I will explain...
We are using Swoole, and I wanted to create a ConcurrentMap
class to allow proper memory protection. I saw that there wasn't an interface I could use to allow the use of Ds\Map
or my own ConcurrentMap
interchangeably, so I tried to figure out what the commonalities were and came up with the above.
As I point out, this is still not helping as I still can't see an interface that allows me to decorate your Ds\Map
with my ConcurrentMap
and use methods like put
and get
etc as they are unique to Map
, so back to the design phase for my classes for me :)
from ext-ds.
I just realised after I wrote that, that I can use ArrayAccess
. I've never been a fan of it as I prefer objects, but it is what it is I guess.
from ext-ds.
Related Issues (20)
- Segmentation fault when Map is used with IteratorIterator (v1.3.0) HOT 3
- Testing for Equality HOT 4
- . HOT 1
- map method for Set? HOT 3
- PHP 8.1 compatibility HOT 5
- How to make sure extension is used HOT 5
- How to install in PHP8 Docker alpine:version image? HOT 8
- Support php 7.4's `__unserialize` to prepare for PHP 9.0 removing Serializable
- Release supporting PHP 8.1 HOT 11
- Audit and update documentation HOT 1
- ReflectionClass and ReflectionObject not reporting information when using Ds\Map via extension
- Passing array item by reference breaks \DS\Set behaviour HOT 1
- php_ds.dll for PHP 8.2.x on Windows HOT 2
- Pecl install missing php 8.2 HOT 3
- Clarify Support for PHP 8.3.x and 9.x? HOT 11
- Segmentation fault merging keys of maps containing maps HOT 7
- DLL missing on PECL for 1.5.0 HOT 3
- Upgrade PECL page to identify homepage HOT 2
- Null coalescing operator on Vector make search failed HOT 2
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 ext-ds.