
notjack
2020-8-28 00:03:24
survey question: what sorts of things have you used “smart constructors” for? (smart constructor == a function you use to construct instances of a struct instead of the normal default constructor)

notjack
2020-8-28 00:04:11
emoji react to any of the following answers:

notjack
2020-8-28 00:04:20
- keyword arguments

notjack
2020-8-28 00:04:32
- default values for fields

notjack
2020-8-28 00:04:47
- “normalizing” field values in some way

notjack
2020-8-28 00:05:06
- other? please share details

samth
2020-8-28 00:52:32
managing de bruijn indexes

notjack
2020-8-28 00:57:46
@samth interesting, got a link?

samth
2020-8-28 00:58:10
typed-racket/rep/type-rep, scroll down

samth
2020-8-28 00:58:30
see make-Poly and make-Mu

notjack
2020-8-28 01:00:31

wanpeebaw
2020-8-28 03:00:11
Factory pattern?

notjack
2020-8-28 03:03:27
sorta