Printing structure predicate relations on one line not always the best

Issue #529 new
Joachim Jansen created an issue

Printing a structure with a big predicate in it will result in annoying circumstances when the file is opened in some editors (that support e.g. only lines up to length 1024).

Maybe there is a better way to print structures, so that no extremely long text lines are created?

Comments (4)

  1. Broes De Cat

    Also has (some) disadvantages, editors that can handle it, such as vim, allow to delete the whole line at one. Still, I'm in favour ;)

  2. Bart Bogaerts

    I agree: often it will be more readable to start new lines now an then.

    E.g.: depending on the size put a newline at every change of the first argument (or at every change of one of the first two arguments or ...)

    Thus

    P = { 1, 2, 3; 1, 3, 3

    2,1,3;2,2,1;

    3,...}

  3. Joachim Jansen reporter

    Above criteria make sense (and structure the predicate quite nicely and intuitively)

    But maybe a hard-coded cutoff must be added in case we have to deal with some weird conditions. It may be interesting to always cutoff after 80 characters (this seems to be a legacy number)?

  4. Broes De Cat

    I certainly would not want to have such a legacy small cutoff! The only reason to provide the cutoff is because some editors otherwise have reduced performance. We should not restructure lines that would fits on the users screen, no matter its size. So I would go for a cutoff in a few 1000 chars.

  5. Log in to comment