Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Go: Functional Options are named args on steroids (uptrace.dev)
3 points by vmihailenco on Oct 21, 2021 | hide | past | favorite | 1 comment


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: