[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Should yaml-ts-mode inherit from prog-mode?

From: Rudolf Schlatte
Subject: Re: Should yaml-ts-mode inherit from prog-mode?
Date: Sun, 12 Mar 2023 13:31:48 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (darwin)

Daniel Fleischer <danflscr@gmail.com> writes:

> Ongaro [2023-03-11 Sat 18:14] wrote:
>> Also not true. If you happen to use some of the keywords like "yes", you
>> have to mind to quote it if you actually meant the string "yes" not a
>> boolean value of true. Of course that is exactly where having a mode
>> which highlights these keywords helps.
> Please point out where in the YAML spec "yes" is used as a boolean. And
> again, usefulness of highlighting different objects does not mean it's a
> programming language. 

This is the "Norway Problem".  A YAML block like this:

      - dk
      - fi
      - is
      - no
      - se

evaluates to the equivalent JSON:

    {"geoblock_regions": ["dk", "fi", "is", false, "se"]}

Example taken from this page, which has many more examples where
semantic highlighting of YAML would avoid a LOT of footguns:


reply via email to

[Prev in Thread] Current Thread [Next in Thread]