Session
Monoidal Identity Elements, or, How to pick a default argument value
OMG, everyone! Destructuring and default values A.I.R.!!!
I love what has been happening to JavaScript over the last few years, and I imagine you do too. Two of the many wonderful additions to the language has been destructuring & default values. With those two things, we have been able to more clearly document function interfaces, aid linting and code completion tools and Leverage many of the features from tools like TypeScript, Flow, & Tern without necessarily buying into their entire ecosystem.
Perhaps it's not something that's been thought about too much, but what to choose for those default values? Would you believe that there's actually a strategy for choosing what value to use for a default value regardless of the particular use case?
Borrowing a wee bit from Category Theory, we can be confident in our default value choice and potentially eliminate a lot of guard clauses and existential checks.
Don't worry though, some of the words might be unfamiliar, but the concepts are actually pretty simple, and we will talk about them in plain language. You likely already understand most of these concepts intuitively but haven't had a name to give them, until now.
Cory Brown
Opinionated but never certain.
Salt Lake City, Utah, United States
Links
Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.
Jump to top