Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: b9d8dbe582683e987c7bb94e8421db6836ffdf7663b195b5676144492a7568c5
Ticket: f4a4bd7f107031f273642cbaefc3cbed72315b1f
lseq "count" argument also dictates output formatting
User & Date: apnadkarni on 2024-08-31 05:25:49
Changes

  1. icomment:
    My two cents -
    
    I think the phrase "string representation" in the initial report confused the real issue which is about how a single argument is interpreted.
    
    I tend to agree with Nathan and Harald with the interpretation of a single argument as a count, both because it feels more natural to me and matches current behavior. Sergey's interpretation of a single argument as the "end" (if I read his suggested document change right) subjectively feels less natural and more important would be a change in behavior as Harald points out (lseq 3 would return 4 elements instead of current 3).
    
    If interpreted as a count then, the question remains whether floating values should be accepted if they are whole integers. While it might be mildly convenient for `lseq 100.0` to generate a floating point sequence, for a graph axis e.g.,  I agree that implicitly basing the type of the sequence values on the count argument is not desirable or should at least be documented.
    
    All in all, TL;DR my preference is the single argument to be stay interpreted as a count but only accept integers (not 3.0).
    
    /Ashok
    
  2. login: "apnadkarni"
  3. mimetype: "text/x-markdown"