Comments (9)
I don't think the goal is to deprive developers of important abilities. The goal is to simplify the common use cases.
So, maybe there should be a way to specify a name for plural and the type of structure used. If unspecified, a default could be inferred.
Furthermore, many collection functionalities could be added via decoration. Colors appColors = unique(colors(white, black))
would behave like a Set instead of a List.
from eo.
@SilasReinagel I was waiting for this ticket. Thanks!
from eo.
There is a reason behind separate collection classes - they're backed by different data structures. How do you suggest to implement this variety in colors
?
from eo.
@scadgek Maybe in some inverted-Java-way: Colors appColors = colors<LinkedList>(white, black)
And if user does not provide < ... >
block, compiler will choose the default structure.
from eo.
@pchmielowski we have arrays in Java, but don't have collections. This is sort of legacy from C/C++. And I'm mostly thinking about iterables, not collections. How exactly that lists, queues, sets, maps, etc will be implemented is up to JDK (EDK maybe). But we have to have that "iterable" thing built into the language, I believe.
from eo.
@yegor256 So if I understand you correctly, you consciously deprive the developers of the ability to choose the underlying data structure?
from eo.
I think we can take inspiration from Java 8 streams here, where the type of collection you want comes about later and just modulate the stream, e.g. unordered(gradient(colors(white, black), 0.1))
to get an unordered stream from a color gradient with a 0.1 increase.
from eo.
@stain we have array
object now, which is an immutable primitive collection with random access.
from eo.
Job gh:cqfn/eo#8
is not assigned, can't get performer
from eo.
Related Issues (20)
- Make XSD as powerful and as restrictive as possible HOT 1
- `PullMojo` and `ResolveMojo` are not proxy-aware HOT 1
- Move `eo-sys` to `eo-runtime` HOT 3
- File name too long HOT 4
- pom.xml:340-343: Enable PMD check for... HOT 2
- BytesOf.java:34-38: This class requires refactoring. As a... HOT 4
- Data.java:196-199: This method should be refactored... HOT 2
- Can we use some static analysis like Sonar in CI on PR? HOT 1
- Failed build: daily HOT 10
- Add `+rt node` meta to work with js compiler HOT 1
- merge smaller libs into this repo HOT 7
- Printing PHI Expressions Extremely Slow HOT 4
- list.eo:208-211: The object does not work. After moving... HOT 2
- PhPackage need update HOT 2
- BytesRaw.java:33-36: Method {@link BytesOf#shift} should... HOT 2
- align-test-classes.xsl:27-28: Add link to corresponding... HOT 2
- remove-high-level-inner-classes.xsl:27-28: Create... HOT 14
- map.eo:105-112: Find a way to link hash code and index of... HOT 2
- text.eo:313-315: Implement text.replaced object. This... HOT 3
- Replace `int` and `float` with `number` HOT 1
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 eo.