Giter Site home page Giter Site logo

Common interface about tuple.dart HOT 5 CLOSED

google avatar google commented on May 11, 2024
Common interface

from tuple.dart.

Comments (5)

alextekartik avatar alextekartik commented on May 11, 2024

Indeed it would great to know if a value is Tuple without having to check each type one by one (is Tuple2, is Tuple3...). It could also a share the common toList method they all have:

/// Represents a tuple.
abstract class Tuple {
  /// Creates a [List] containing the items of this [Tuple].
  ///
  /// The elements are in item order. The list is variable-length
  /// if [growable] is true.
  List toList({bool growable = false});
}

from tuple.dart.

Solido avatar Solido commented on May 11, 2024

from tuple.dart.

alextekartik avatar alextekartik commented on May 11, 2024

Thanks for the information @Solido. Is there any place I could look for more information (current status, planned implementation) as I could not find relevant information so far?

from tuple.dart.

Solido avatar Solido commented on May 11, 2024

HI @alextekartik
This is linked to dart Destructuration feature

https://github.com/dart-lang/language/blob/09caf04efbf19b35af2cecce8a7c17afa7868882/working/0546-patterns/goals-and-constraints.md

from tuple.dart.

Solido avatar Solido commented on May 11, 2024

And dart-lang/language#68

from tuple.dart.

Related Issues (16)

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.