Selecting values in a selection box

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lasse Reichstein Nielsen

    #16
    Re: Selecting values in a selection box

    Lee <REM0VElbspamtr ap@cox.net> writes:
    [color=blue]
    > If a variable contains multiple addressable values in an ordered
    > sequence, it is an array. There is no requirement for arrays to
    > be writable.[/color]

    That is one defintion of "array", using the common definition of the
    word, not the technical one.

    If anybody talks abouts "arrays" in a discussion about a typed
    language like Java, I would be surpriced if they meant something
    except the language's array type.

    Javascript is a less strict language. The array subscript notation can
    be used on any object, as can the methods of the prototype, so the
    only thing that makes arrays special are their magic length property.

    So, I can see why some people would use the word "array" about objects
    that only resemble an array. They should be aware that it is
    potentially confuzing. When I read "array", I understand it as meaning
    "instanceof Array", unless it is clear from the context that it's not.
    (I.e., I agree with PointedEars, except for the way of saying it.)
    /L
    --
    Lasse Reichstein Nielsen - lrn@hotpop.com DHTML Death Colors:
    <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html> 'Faith without
    judgement merely degrades the spirit divine.'

    Comment

    • Lee

      #17
      Re: Selecting values in a selection box

      Lasse Reichstein Nielsen said:[color=blue]
      >
      >Lee <REM0VElbspamtr ap@cox.net> writes:
      >[color=green]
      >> If a variable contains multiple addressable values in an ordered
      >> sequence, it is an array. There is no requirement for arrays to
      >> be writable.[/color]
      >
      >That is one defintion of "array", using the common definition of the
      >word, not the technical one.
      >
      >If anybody talks abouts "arrays" in a discussion about a typed
      >language like Java, I would be surpriced if they meant something
      >except the language's array type.[/color]

      In my original post to this thread, I very clearly differentiated
      between an "Array", and an "array".

      Comment

      • Lasse Reichstein Nielsen

        #18
        Re: Selecting values in a selection box

        Lee <REM0VElbspamtr ap@cox.net> writes:
        [color=blue]
        > In my original post to this thread, I very clearly differentiated
        > between an "Array", and an "array".[/color]

        You did. The original answer (by Michael Winter, IIRC) that started
        this the thread on this subject, did not.

        You said it was an "array", not an "Array" (without explaining what
        the difference is). While that is sufficient to make me understand
        what you mean, I actually don't like using "an Array" about instances
        created from the "Array" constructor ... if anything, I'd prefer "and
        instance of Array". Chalk it up to taste :)

        Had it been a class based language, I wouldn't have any problem
        calling an instance of a class by the class name, e.g. "an Apple" for
        an instance of the class "Apple". It's just that Javascript doesn't
        have classes. :)

        /L
        --
        Lasse Reichstein Nielsen - lrn@hotpop.com
        DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
        'Faith without judgement merely degrades the spirit divine.'

        Comment

        • Lee

          #19
          Re: Selecting values in a selection box

          Lasse Reichstein Nielsen said:[color=blue]
          >
          >Lee <REM0VElbspamtr ap@cox.net> writes:
          >[color=green]
          >> In my original post to this thread, I very clearly differentiated
          >> between an "Array", and an "array".[/color]
          >
          >You did. The original answer (by Michael Winter, IIRC) that started
          >this the thread on this subject, did not.
          >
          >You said it was an "array", not an "Array" (without explaining what
          >the difference is). While that is sufficient to make me understand
          >what you mean, I actually don't like using "an Array" about instances
          >created from the "Array" constructor ... if anything, I'd prefer "an
          >instance of Array". Chalk it up to taste :)
          >
          >Had it been a class based language, I wouldn't have any problem
          >calling an instance of a class by the class name, e.g. "an Apple" for
          >an instance of the class "Apple". It's just that Javascript doesn't
          >have classes. :)[/color]

          It was an informal use, intended to make the point concisely.

          Going back to the original point, but using more precise terminology,
          it seems as if you agree with me that the options attribute of the
          Select object is an array, albeit not an instance of an Array.

          Comment

          Working...