say

Easier print in Prolog

say(Lst) :- is_list(Lst), writeln(Lst).
say(S)   :- say(S,[]).
say(S,P) :- string_concat(S, '~n', S1), format(S1,P).

?- say('hello').
hello
true.

?- say('hello ~w',[world]).
hello world
true.

?- say('hello ~w ~w',[new,world]).
hello new world
true.

Java invention of the decade

Ladies and gentleman,
I present to you the biggest invention in Java since sliced bread :

public static <ARG> void say(ARG arg) { System.out.println(arg); }

Now you can do :

say("This is less annoying than System.out.whatever"; }

… where is my award :”)