Arc Forumnew | comments | leaders | submitlogin
Is 'predicate' a better name for testify?
3 points by akkartik 4818 days ago | 6 comments
I've never liked the name testify. A year ago[1] we discussed a few options (fun, asfn, testifn, ..) without me being moved to make a change in wart. But how about predicate?

  (def all (f seq)
    (~some (complement predicate.f) seq))
It's super clear. A little long, but it's used so infrequently a longer name seems ok. What do people think?

[1] http://arclanguage.org/item?id=13668



2 points by dido 4817 days ago | link

I suppose the main problem is that testify is a real word, meaning to bear witness to, to serve as evidence or proof. This is tantalizingly close, but doesn't quite have the meaning of turning something into a test for truth or falsity, but if you squint hard you might be able to make it fit.

-----

2 points by Pauan 4817 days ago | link

Well, since it tests with "is" I'd probably call it "isify" or maybe "boolify". "predicate" is pretty good too!

-----

1 point by Pauan 4817 days ago | link

By the way, one problem with "predicate" is that it doesn't really say what it's doing... is it testing whether something is a predicate? Is it creating a predicate? Is it a sentinel value that represents a predicate, similar to t/nil?

I really prefer the "ify" suffix because it's quite clear that it's coercing to a type. Hm... maybe "predicatify"? Maybe... "predify"? I like that last one. It rolls off the tongue. Prehd-ihf-eye.

-----

2 points by akkartik 4817 days ago | link

The most natural interpretation of generic-noun function names is as constructors. 'predicate' creates a predicate.

I admit, this felt unnatural at the start because I had to wean myself away from thinking in terms of transformation. I used to have a function called stringify to convert symbols to strings[1], but eventually I noticed that plain string does the job just fine.

In wart at least I'm consistent about ending real predicates with a '?', so it won't be mistaken for a test itself. Wart has also collapsed obj into table so the pattern of constructor names is stronger.

[1] I just noticed that the earlier thread about testify refers to stringify as well further down: http://arclanguage.org/item?id=13668. See also http://arclanguage.org/item?id=11103.

-----

3 points by evanrmurphy 4816 days ago | link

> The most natural interpretation of generic-noun function names is as constructors.

Before I was lukewarm on the name, but this reminded me of the pronunciation difference. Pronounce it like the noun (predikit) and it sounds confusing, but pronounce it like the verb (predikayte) and it sounds great.

I like it!

-----

2 points by rocketnia 4816 days ago | link

I think a verbalization of "predikit" is a better way to read it. "Predikayte" already has a different meaning, one that could make people think of assertions... essentially the same meaning trouble as "testify," right? :-p

Personally, I think this is all moot, but I'd go with "checkify" or "to-check".

  testify
    Pro: Only 7 characters long.
    Pro: Bunches with related words containing "ify."
    Con: Bunches with unrelated words containing "test."
    Con: Is a neologism if used in English.
    Con: Has non-sequitur homonyms in English (one meaning "claim").
    Con: The vocal majority here at Arc Forum seems to dislike it. :-p
  
  predicate
    Pro: Bunches with related words containing "icate."
    Con: Debatable pronunciation.
      "predikayte"
        Con: Is a neologism if used in English, I think. It
          reinterprets the verb as a verbalization of the "predikit"
          version, when "predikit" is actually something of a
          nominalized form of "predikayte" in the first
          place[Wiktionary]. Is it already used this way?
        Con: Has non-sequitur homonyms in English (one meaning
          "assume").
      "predikit"
        Pro: Same as a related term used in English discussion.
      "predikahtay"
        Con: Has a non-sequitur homonym in Italian (meaning
          "preach")[Wiktionary].
    Con: Since it has the same spelling as a noun, it may conflict with
      other noun-based names (e.g. accessors, local variables).
    Con: In English discussion, needs special formatting to look like a
      variable name.
  
  checkify
    Pro: Bunches with related words containing "check."
      Pro: "Check" is a related term that can be dropped casually into
        English discussion.
      Con: "Check" has many non-sequitur homonyms in English (one
        meaning "restrict").
    Pro: Bunches with related words contianing "ify."
    Con: Is a neologism if used in English.
  
  to-check
    Pro: Bunches with related words containing "check."
      Pro: "Check" is a related term that can be dropped casually into
        English discussion.
      Con: "Check" has many non-sequitur homonyms in English (one
        meaning "restrict").
    Pro: Bunches with related utilities containing "to-".
    Con: Is a downright technical term if used in English.
    Con: "To check" could be seen as an infinitive form.

-----