GithubHelp home page GithubHelp logo

Comments (9)

SilasReinagel avatar SilasReinagel commented on August 16, 2024 1

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.

yegor256 avatar yegor256 commented on August 16, 2024

@SilasReinagel I was waiting for this ticket. Thanks!

from eo.

scadgek avatar scadgek commented on August 16, 2024

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.

pchmielowski avatar pchmielowski commented on August 16, 2024

@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.

yegor256 avatar yegor256 commented on August 16, 2024

@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.

scadgek avatar scadgek commented on August 16, 2024

@yegor256 So if I understand you correctly, you consciously deprive the developers of the ability to choose the underlying data structure?

from eo.

stain avatar stain commented on August 16, 2024

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.

yegor256 avatar yegor256 commented on August 16, 2024

@stain we have array object now, which is an immutable primitive collection with random access.

from eo.

0crat avatar 0crat commented on August 16, 2024

Job gh:cqfn/eo#8 is not assigned, can't get performer

from eo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.