Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> .yaml is the preferred extension, .yml is dated

Is this really true? Basically every project I've ever cloned or set up that relied on YAML still uses .yml as the extension.



I've always used .yaml and have never understood why someone would choose .yml. Three letter extensions haven't been a requirement since like DOS 5 and I can't imagine that many developers are both using YAML and still using FAT16 but can't afford VFAT long filename entries.


> I've always used .yaml and have never understood why someone would choose .yml.

Because it's what the documentation says. For instance, the "Getting Started" example at https://docs.flatpak.org/en/latest/first-build.html says "call it org.flatpak.Hello.yml" - and that's Flatpak, which has always been a Unix-specific thing.


Old DOS "8.3" restri~1 are still followed by some people. Force of habit I suppose? Also the docume~1 or examples of some projects use .yml and I can't be bothered to experi~1 if both work, because it doesn't really matter.


> have never understood why someone would choose .yml

Probably for the same reason people don't type other 4-letter extensions, like `.ruby` or `.rust`.

I guess `.java` is the exception (no pun intended).


.yml is similar to .xml


… but YAML ain't a markup language.

(That's the 'A', in YAML, literally.)


That's a backronym; originally it meant "yet another".


The current acronym is old enough to drink. The original acronym, AFAICT looking through The Wayback Machine, lasted less than a year. (The original language was pretty wildly different, and much closer to a markup language.)

For those that don't want to wait for the time capsule, here is the earliest example of it (I've shortened it from the original for brevity; best I can gather this should also have been valid):

  <timesheet.clarkevans.com:record>
    <person:record>
      <id:int>
        293945</id:int>
      <name:record>
        <given>
          Clark</given>
        <family>
          Evans</family></name:record></person:record>
  </timesheet.clarkevans.com:record>
You can feel the XML influence.

Oddly it kept the "Another" well into the evolution of not being a markup language anymore, but on the grand scale of things, didn't really keep it that long.


Ansible generally prefers .yml - https://github.com/redhat-cop/automation-good-practices/tree... "When naming files, use the .yml extension and not .yaml. .yml is what ansible-galaxy init does when creating a new role template."


It's what the YAML FAQ say: https://yaml.org/faq.html


I'd just be glad for the community to standardize on one or the other. I don't care either way but right now we sometimes have both .yml and .yaml in the same directory! For GitHub Actions (the only place where I use yaml) there doesn't seem to be a clear consensus yet.


GitHub Actions uses .yml in examples. [1]

Thought it supports both equally.

[1] https://docs.github.com/en/actions/quickstart


Well, now there’s an RFC to refer to, and it makes a clear choice: .yaml.


The two replies I received--one saying .yml is the GitHub standard, and the other saying .yaml is the RFC standard--neatly summarizes the situation we're in. I don't think this extension mess is ever getting fixed.


I assume that it's because people are still struggling to move away from 8.3 filenames (https://en.wikipedia.org/wiki/8.3_filename).


I mean … probably depends on local preferences. Every project I've ever worked on used .yaml.

.yml feels like .htm to me. DOS is long since gone.

But, Github seems to think they're about the same, with a lead for .yml: 23.9M hits for .yml, 17.8M for .yaml.


Wouldn't the analog of .htm be .yam?


I cringe at .htm


While I personally prefer .yml (shorter is better), yeah .yaml is the standard convention.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: