Tips for golfing in Pike Pike is a dynamically typed interpreted scripting language, heavily influenced by C, which typically compiles to C99 with a few #defines. (It even has a preprocessor!)

What general tips do you have for golfing in Pike? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to Pike (e.g. "remove comments" is not an answer).
Abuse mixed.

Pike is unfortunately not exactly identical to C; for instance the type of a list of strings is array(string), not char[][] or even string[].

Any time you need a type declarator and it's not int, mixed (the "any" type, which gets promoted to the actual type of the RHS at runtime) is liable to be shorter.

A function that takes a list of ints and sorts it, then returns it, for a whopping 41 bytes:

array(int)s(array(int)l){return sort(l);}


Or, the type-inferencing version, which is 31 bytes:

mixed s(mixed l){return sort(l);}


My answer to Manage Trash So uses a lot of mixed.