Women in Technology

Hear us Roar

  What I Hate About Your Programming Language
Subject:   Screw this! Why I love Prolog
Date:   2003-05-13 21:52:00
From:   anonymous2
In Prolog you describe the problem instead of attempting to describe a (usually, accidentally, inevitably partial) solution.

This solves two problems at once: once the problem is understood, it is also (Zen-like) solved.

Full Threads Newest First

Showing messages 1 through 3 of 3.

  • Screw this! Why I love Prolog
    2003-05-14 01:12:31  anonymous2 [View]

    It doesn't scale, but - you've got to understand all of the problem all at once, or use various hacks to divide and conquer. Prolog is good if you're Marvin the Paranoid Android.
    • Screw this! Why I love Prolog
      2003-05-14 06:11:57  anonymous2 [View]

      Prolog doesn't scale, but Mercury does ;)

      I think that a lot of the benefits of programming in Prolog though are strongly linked to its interpreted nature and the way it lets you do things on the fly. Some of that dies when you move to a more hardcore statically typed lanugage like Mercury.
  • Screw this! Why I love Prolog
    2003-05-14 04:51:18  anonymous2 [View]

    At best true for toy problems and if you're satisfied with O(n!) performance. There's quite a difference between:

    randomsort(L1, L2) :-
    permutation(L1, L2), ordered(L2).


    quicksort([], []).
    quicksort([X], [X]) :- !.
    quicksort([H|T], S) :-
    partition(H, T, L1, H2),
    quicksort(L1, S1),
    quicksort(L2, S2),
    append(S1, [H | S2], S).

    I like Prolog a lot, but the "describe the problem instead of the solution" claim is only partially true. Using it as the only reason to say you love Prolog mostly indicates that you should look for better arguments.

    BTW: "Zen-like"? I think SLD-resolution is more responsible...