ludic/examples/rejected/friend_scope.ludic
Orkuncakilkaya 70d05bd504 feat(lang): friend module lab of fishing, data - a friend of the modules it names
A scoped friend sees those modules' private names and only the exports
of every other; a plain friend module still sees everything. Reseed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 04:12:47 +03:00

10 lines
226 B
Text

# L3: a friend of kit is not a friend of bank - bank's private `add` stays out of reach
import "private_bank"
import "private_kit"
program FriendScope {
friend module lab of kit
entry {
add(5)
print(total())
}
}