Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
Go: Functional Options are named args on steroids
(
uptrace.dev
)
3 points
by
vmihailenco
on Oct 21, 2021
|
hide
|
past
|
favorite
|
1 comment
DeathArrow
on Oct 21, 2021
[–]
In both C# and Nim (and probably other languages ) it's easy to use fluent syntax:
MyConfig() .WithTimeout(0).WithDir("/home").DirFromEnv("DIR")
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
MyConfig() .WithTimeout(0).WithDir("/home").DirFromEnv("DIR")