Git Product home page Git Product logo

Comments (5)

chriskrycho avatar chriskrycho commented on May 27, 2024 5

This is a good thing to consider changing, though note that keywords and control structures in most languages are allowed to have their own syntactic forms. I would also suggest that the time to make that change would be in a broader syntactic reform, i.e. a switch to a single-curly-based form that is similar to Svelte's templates:

<template lang='sveltish'>
  {#if condition}
  {:else if otherCondition}
  {:else}
  {/if}
</template>

from rfcs.

runspired avatar runspired commented on May 27, 2024 2

+1 for broader reform. Been thinking of proposing this since it actually wouldn't be hard to implement in the parser and could be done initially as an external optional offering. Double curlies don't feel necessary anymore to me.

from rfcs.

sandstrom avatar sandstrom commented on May 27, 2024

I think this is something that Ember has inherited from Handlebars:
https://handlebarsjs.com/guide/builtin-helpers.html#if

I don't know how far Ember templates has deviated from Handlebars, so maybe going further away isn't a problem.

But one thing to consider is that Handlebars tooling (linting, syntax highlighters, etc) mostly work with Ember, which is nice. With a custom template language, Ember would have to maintain that stuff themselves, which is more work.

from rfcs.

chriskrycho avatar chriskrycho commented on May 27, 2024

That's correct; technically Glimmer templates are still Handlebars templates. They've diverged substantially, but by addition rather than by change overall. The first pass of the parser is the JS Handlebars parser… but then we have to do more work to get to what we have today. That's a real and genuine concern, regardless, especially as regards syntax highlighting.

from rfcs.

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.