Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
jayd16
52 days ago
|
parent
|
context
|
favorite
| on:
Features of D That I Love
If all you're doing is accessing public members, sure.
nicwilson
51 days ago
|
next
[–]
`private` is only private to the module, not the struct/class, (In other words, all functions in the same module are all C++ style `friend`s) and so free function in same module work.
WalterBright
51 days ago
|
prev
[–]
It works for all functions that have parameters, `f(a)` and `a.f()` are equivalent.
jayd16
51 days ago
|
parent
[–]
Yes, but I presume that f() cannot access private members of a.
WalterBright
51 days ago
|
root
|
parent
[–]
That's correct.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: