Coder Social home page Coder Social logo

Comments (7)

MiroHibler avatar MiroHibler commented on May 18, 2024 2

Would it make sense to simplify helpers to use either only positional or only keyword args? So either:

{{helper x y}}

Or

{{helper x=x y=y}}

The second seems more desirable as a single option, since with positional arguments you need to constantly be looking up the order, etc. Unfortunately all current code uses the first.

I'd do both for backward compatibility, get rid of hash and make the same for inclusion tags ({{> foo x y=y}}) and block tags ({{#foo x y=y}}).

from blaze.

mitar avatar mitar commented on May 18, 2024 1

This would potentially be backwards incompatible. But yes, this is really unneeded. Also, I think it is unneeded that data is stored inside hash ant not directly inside Spacebars.kw object.

from blaze.

stubailo avatar stubailo commented on May 18, 2024 1

No reason I can imagine at all. We should 100% get rid of it.

from blaze.

stubailo avatar stubailo commented on May 18, 2024

Would it make sense to simplify helpers to use either only positional or only keyword args? So either:

{{helper x y}}

Or

{{helper x=x y=y}}

The second seems more desirable as a single option, since with positional arguments you need to constantly be looking up the order, etc. Unfortunately all current code uses the first.

from blaze.

mitar avatar mitar commented on May 18, 2024

The question for me is just why we have hash property for data, why it is not simply an object which is an instance of something (Spacebars.kw) and this is it?

from blaze.

stubailo avatar stubailo commented on May 18, 2024

I agree that helper and inclusion syntax should be consistent!

from blaze.

filipenevola avatar filipenevola commented on May 18, 2024

I'm closing this issue because it's too old.

If you think this issue is still relevant please open a new one.

Why? We need to pay attention to all the open items so we should keep opened only items where people are involved.

from blaze.

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.