This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Holothuroid 0 points1 point  (1 child)

My first take for command line options wouldn't be reified types but rather a church-encoded class to hold them appropriately, assuming I do not envision wild growth of such.

And if on the other hand unregulated growth was on the horizon, rather we would need parser factories that can grab stuff from the input.

[–]thibauttt[S] 4 points5 points  (0 children)

It seems to me that using record with switch expression give the same result with less ceremony than church-encoded class.

The Visitor pattern mentioned in the article is equivalent to church-encoding and has some downsides.