Coder Social home page Coder Social logo

Use a fun as Data about bbmustache HOT 4 CLOSED

soranoba avatar soranoba commented on June 14, 2024 1
Use a fun as Data

from bbmustache.

Comments (4)

soranoba avatar soranoba commented on June 14, 2024

Hm ...

The PR probably works properly, but I do not feel that need.
In labmda, it would be easier to use simplified data.

So why does it support assoc list?
The project I was working on when I created bbmustache was not able to use maps.
Then time has passed.
I will stop to support assoc list when incrementing major version.

Please fork and remodel bbmustache to use it easy for yourself.

Thanks.

from bbmustache.

k32 avatar k32 commented on June 14, 2024

Well my idea was that using a closure as data in theory allows to use any key-value storage without modifying bbmustache.erl... It will allow storing data in dict, ets, map and what not. So it's just "the" generic solution. In theory it would allow to remove lots of map-related ifdefs from the code to make it nicer.
That's why I think it's worth integrating into the upstream. But anyways, it's your decision to make.

from bbmustache.

Vagabond avatar Vagabond commented on June 14, 2024

You could also do things like have key.base64 in case you wanted (or base64(key)) in the template, to turn something into base64 and parse that out in your data fun before doing the lookup.

I'm looking at doing some more sophisticated templating with bbmustache and I would like to have this option as well.

from bbmustache.

soranoba avatar soranoba commented on June 14, 2024

#53 (comment)

from bbmustache.

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.