Giter Club home page Giter Club logo

Comments (6)

robb avatar robb commented on May 28, 2024

Yeah, Non-associative operator is adjacent to operator of same precedence is kind of a dealbreaker, I really don't want to override the associativity of ==.

Also, it would complicate capturing constraints.

from cartography.

robb avatar robb commented on May 28, 2024

There could be something like alignTopEdges(view1, view2, view3), too, but I'm not sure what the syntax should be.

from cartography.

robb avatar robb commented on May 28, 2024

I guess you could also have something like

layout(view1, view2, view3) { view1, view2, view3 in 
    combine(view1, view2, view3).top == view1.superview!.top
}

but that looks even more complicated

from cartography.

mergesort avatar mergesort commented on May 28, 2024

Fair points. I think #77 (comment) might be too specific, but is closest to what I'd envision. There could be a function that takes in a set of views, and an edge/dimension/size.

layout(view1, view2, view3) {
    equal([view1, view2, view3], Edge.top) // or Dimension or size
}

from cartography.

truppelito avatar truppelito commented on May 28, 2024

@mergesort Just my two cents: if you exchange the order of the arguments you can dispense with the square brackets by using variadic parameters equal(Edge.top, view1, view2, view3). That's probably better?

from cartography.

mergesort avatar mergesort commented on May 28, 2024

@truppelito Var args sound good to me. 👍

from cartography.

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.