Language Reference: Section on objects mixes up dodo bird example and pigeon example #13

Open
opened 2025-12-30 01:19:32 +01:00 by adam · 0 comments
Owner

Originally created by @mmorearty on GitHub (Feb 4, 2024).

This is probably a simple editing error due to some changes that took place as the documentation was being written.

Defining Objects gives an example with dodo birds:

dodo {
  name = "Dodo"
  taxonomy { 
    `class` = "Aves" 
  }
}

But then a subsequent paragraph mentions a different example (emphasis added by me):

Like all values, objects are immutable, which is just a fancy (and short!) way to say that their properties never change. So what happens when Pigeon moves to a different street? Do we have to construct a new object from scratch?

I think the emphasized sentence needs to be rewritten to refer to the dodo bird vs the tortoise in the following section.

Originally created by @mmorearty on GitHub (Feb 4, 2024). This is probably a simple editing error due to some changes that took place as the documentation was being written. [Defining Objects](https://pkl-lang.org/main/current/language-reference/index.html#defining-objects) gives an example with dodo birds: ``` dodo { name = "Dodo" taxonomy { `class` = "Aves" } } ``` But then a subsequent paragraph mentions a different example (emphasis added by me): > Like all values, objects are immutable, which is just a fancy (and short!) way to say that their properties never change. **So what happens when Pigeon moves to a different street?** Do we have to construct a new object from scratch? I think the emphasized sentence needs to be rewritten to refer to the dodo bird vs the tortoise in the following section.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pkl#13