You're arguments are all good, but they don't help with my own problem that an argument listed as an untyped "string" (and not familiar, item or other defined type) makes me feel that I should be able to pass whatever to it and either get a "real" response or an error message back if that string wasn't what was expected of me to pass into the function.
But, as I said, that is a problem with my expectations of how things should work as very much a non-programmer.
If you write ASH scripts, you ARE a programmer.
I agree that it would be useful to make is_trendy(string) print a message if the supplied string doesn't match anything. Much better than silently returning true -- someone could assume there was fuzzy matching to a specific thing when actually it was being treated as gibberish.
Error messages again.
ASH is a programming language. When your ASH program calls a function, you get a (hopefully meaningful) return value back. If you pass in a bad argument and the function "prints an error message", what does your program do? Nothing. An "error message" is completely useless to an ASH program.
When I wrote is_trendy, I made a conscious, considered decision to return true for anything which typeii.php did not tag as untrendy. That file does not have a big list of every possible item, familiar, skill, and so on. It has a specific subset of such objects which are or will eventually become untrendy. There are many other objects which will never be listed in that file. Hell Ramen will never be unfashionable. Neither will a snorkel, or a mosquito, or Stream of Sauce. Therefore, is_trendy returns "true" for those items.
Suppose a new non-limited item appears tomorrow: dog pants. KoLmafia does not have it in its data base. If you ask if the general string "dog pants" is trendy, is_trendy will return true. It has no reason NOT to return true; the item does not appear in typeii.php as being Untrendy, so, if you happen to have the item, you are not restricted from using it.
Suppose you speculatively ask about "armadillo pants" - a bogus name. is_trendy returns "true", since typeii.php does not list it and, if you happen to have the item, skill, familiar - whatever it is! - the Trendy path will not prevent you from using it.
And yet, somehow, you want KoLmafia to detect that this random string is unknown and give an "error message"? Saying what? Something like "The string armadillo pants does not appear in typeii.php and is not recognizable as a known item, familiar, or skill, although it might be a Clan Item or a Campground Item which we don't know about yet"?
Would you prefer that the function be called is_not_trendy() and return true for exactly those objects which appear in typeii.php as restricted? Of course, if you do that and ask if "armadillo pants" are not trendy, you will be told "false" - which means, just as currently, that if you happen to have "armadillo pants", whatever they are, the Trendy path will not prevent you from using them. There is STILL nothing that is_not_trendy could do to detect that a random string will never match anything in that file.
The intended use for is_trendy is to apply it to the specific items which you have in inventory or storage - which are known to be items - or known familiars, or known skills or ... known whatever objects. You should never need to have an unknown string as an argument.
Please explain exactly how your PROGRAM would need to pass in an unknown string to is_trendy, rather than an item from inventory or a familiar from your terrarium, or some other known thing. Show me code.
Please explain how is_trendy COULD detect that an unknown string is not valid and never could be valid.
Summary: I don't see is_trendy() changing.