It seems like woodPidgeon is amending bird but that doesn't seem true in the code.
It may be very confusing (and it was) the first time ones reads about it.
I've refrained from doing a PR directly since I don't know which narration you'd prefer to have here.
Originally created by @ghyatzo on GitHub (Mar 5, 2024).
hello,
In the amending tutorial, in the `nestedAmend.pkl` example
there is the extract
```
woodPigeon {
name = "Common wood pigeon"
diet = "Seeds"
taxonomy {
species = "Columba palumbus"
}
}
stockPigeon = (woodPigeon) {
name = "Stock pigeon"
taxonomy {
species = "Columba oenas"
}
}
dodo = (stockPigeon) {
name = "Dodo"
extinct = true
taxonomy {
species = "Raphus cucullatus"
}
}
```
and in the description there is a clear reference to the taxonomy field in the bird example previously treated
>In this example, `bird.taxonomy` has` kingdom`, `clade`, `order` and `species`
but the `bird.taxonomy` object has no `species property in the example
```
bird {
name = "Pigeon"
diet = "Seeds"
taxonomy {
kingdom = "Animalia"
clade = "Dinosauria"
order = "Columbiformes"
}
}
```
It seems like `woodPidgeon` is amending `bird` but that doesn't seem true in the code.
It may be very confusing (and it was) the first time ones reads about it.
I've refrained from doing a PR directly since I don't know which narration you'd prefer to have here.
It seems like woodPidgeon is amending bird but that doesn't seem true in the code.
I guess you're right here. woodPigeon is a completely new property and has nothing to do with the previously defined bird.
Otherwise it should be used like
woodPigeon = (bird) {
😉 Like also the first examples describe.
So the sentences In this example, bird.taxonomy has kingdom, clade, order and species is wrong for this example, but might be worth to move to the first example...
@StefMa commented on GitHub (Mar 5, 2024):
> It seems like woodPidgeon is amending bird but that doesn't seem true in the code.
I guess you're right here.
`woodPigeon` is a completely new property and has nothing to do with the previously defined `bird`.
Otherwise it should be used like
```
woodPigeon = (bird) {
```
😉 Like also the first examples describe.
So the sentences `In this example, bird.taxonomy has kingdom, clade, order and species` is wrong for this example, but might be worth to move to the first example...
See also https://pkl-playground.vercel.app/?share=longer-drew-call
Ahah thanks for confirming I am not mad, at first it confused me quite a bit.
Thanks for the clarification.
If I may, separating the two examples using slightly different objects might seem confusing, I don't know if that was deliberate or not but while working through it, it made things clearer just having woodPidgeon amend bird to begin with.
But it's just a minor feedback from a pkl noob so take it as it is 😁 I might be missing the point completely.
@ghyatzo commented on GitHub (Mar 5, 2024):
Ahah thanks for confirming I am not mad, at first it confused me quite a bit.
Thanks for the clarification.
If I may, separating the two examples using slightly different objects might seem confusing, I don't know if that was deliberate or not but while working through it, it made things clearer just having `woodPidgeon` amend bird to begin with.
But it's just a minor feedback from a pkl noob so take it as it is 😁 I might be missing the point completely.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @ghyatzo on GitHub (Mar 5, 2024).
hello,
In the amending tutorial, in the
nestedAmend.pklexamplethere is the extract
and in the description there is a clear reference to the taxonomy field in the bird example previously treated
but the
bird.taxonomyobject has no `species property in the exampleIt seems like
woodPidgeonis amendingbirdbut that doesn't seem true in the code.It may be very confusing (and it was) the first time ones reads about it.
I've refrained from doing a PR directly since I don't know which narration you'd prefer to have here.
@StefMa commented on GitHub (Mar 5, 2024):
I guess you're right here.
woodPigeonis a completely new property and has nothing to do with the previously definedbird.Otherwise it should be used like
😉 Like also the first examples describe.
So the sentences
In this example, bird.taxonomy has kingdom, clade, order and speciesis wrong for this example, but might be worth to move to the first example...See also https://pkl-playground.vercel.app/?share=longer-drew-call
@ghyatzo commented on GitHub (Mar 5, 2024):
Ahah thanks for confirming I am not mad, at first it confused me quite a bit.
Thanks for the clarification.
If I may, separating the two examples using slightly different objects might seem confusing, I don't know if that was deliberate or not but while working through it, it made things clearer just having
woodPidgeonamend bird to begin with.But it's just a minor feedback from a pkl noob so take it as it is 😁 I might be missing the point completely.