Hacker News new | ask | show | jobs
by mkl 2157 days ago
I spotted a typo on the linked page: "vistual"

The dot indentation syntax seems very strange. Why not just indent? Is the intention to reduce nested indentation a little?

1 comments

Thanks for letting me know about the typo.

The dot space is used to mark arguments since some arguments span multiple lines but are connected. For example, in

  Theorem:
  . for: x
    where: y
    then: z
  . 'some statement'
the 'for:where:then' group together is one argument, while the 'some statement' item is the second argument. The dot is needed to distinguish from

  Theorem:
    for: x
    where: y
    then: z
    'some statement'
where it is hard to tell where one argument stops and another starts.
What about the following, though?

  Theorem:
    for: x
      where: y
      then: z
    'some statement'