Talk:Combinator library

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Vague[edit]

The precise definition here is so vague as to be formally unusable. In software, I can stick anything at all into a library. I can create a library that does "something whizzy with X's" -- it sounds like this is saying that "a combinator library is a library that does something whizzy with combinators" -- which is an incredibly shallow idea. So this article is trying to define something more precise than that? What is that?

It mentions parsers .. but a parser is just a function that takes some input and generates some output. Big deal. A combinator is more-or-less the same thing as a function that takes some input and generates some output. (well, to be precise, combinators can only be applicative, and can only produce output after beta reduction - but so what: you can convert any function into a combinator.) So why does the article mention parsing? What's that got to do with anything? 67.198.37.16 (talk) 18:48, 19 December 2017 (UTC)[reply]

I think combinator libraries arose in the functional programming community because these languages often readily facilitate representing something that *does* something as a first class object of that language.
My interpretation of "X combinator" is a library which treats X's as first class objects. Contrast YACC or perhaps some other library/tool that gives you the means to implement a parser with Parsec, a library that provides a first class representation of parsers. Or, consider a library for drawing shapes (e.g. OpenGL.DrawBox(200px, 500px);) against a combinator library that provides a first class representation of shapes and means of building new ones: Overlay(Box(200,500),Circle(400)).
It's more or less accessible when the X's are fairly concrete like parsers, test-suites, shapes, websites, but becomes more vague as the concepts become more abstract and tend toward general computation, like streaming computations, exception handlers, parallel computations.
I think there is a basis for an interesting article here. I also think that, while probably etymologically significant, the reference to combinatorics can be misleading --Kjandersen (talk) 11:07, 10 August 2018 (UTC)[reply]