Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Straw poll extensions?

Straw poll extensions?

Scheduled Pinned Locked Moved The Lounge
question
14 Posts 9 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J jmaida

    I am surprised by the results of straw poll. I voted that "." was part of the extension. How else would you know it was an extension? I don't get it.

    "A little time, a little trouble, your better day" Badfinger

    R Offline
    R Offline
    RickZeeland
    wrote on last edited by
    #2

    That's the point :-\

    J 1 Reply Last reply
    0
    • J jmaida

      I am surprised by the results of straw poll. I voted that "." was part of the extension. How else would you know it was an extension? I don't get it.

      "A little time, a little trouble, your better day" Badfinger

      CPalliniC Offline
      CPalliniC Offline
      CPallini
      wrote on last edited by
      #3

      Consider, for instance, an open range, defined by

      a < x < b

      Now, you know the range because you know both a and b, however, none of them is part of the range.

      "In testa che avete, Signor di Ceprano?" -- Rigoletto

      In testa che avete, signor di Ceprano?

      1 Reply Last reply
      0
      • J jmaida

        I am surprised by the results of straw poll. I voted that "." was part of the extension. How else would you know it was an extension? I don't get it.

        "A little time, a little trouble, your better day" Badfinger

        T Offline
        T Offline
        trønderen
        wrote on last edited by
        #4

        You have the same problem with path separators: If the slash is not part of the preceding directory name, how do you know that it is a directory name? So the slash (or backslash, depending on OS) must be part of the directory name.

        1 Reply Last reply
        0
        • J jmaida

          I am surprised by the results of straw poll. I voted that "." was part of the extension. How else would you know it was an extension? I don't get it.

          "A little time, a little trouble, your better day" Badfinger

          P Offline
          P Offline
          PIEBALDconsult
          wrote on last edited by
          #5

          Nope, just delimiters which are added when the path/name is formatted as a string for a particular purpose, primarily as aids to human readability. The delimiters do not exist in the file system itself -- definitely not in FAT at least, and probably not in any others. If someone has first name John and last name Smith, you may see it expressed as a string as "Smith, John" -- the comma is not part of either name, it is just an artifact of that particular formatting. Asking which name it is part of is nonsensical. And other purposes may require other formattings, such as: <Name First='John' Last='Smith' /> The situation is more obvious with all the various ways people format dates and times within their cultures. If you split the parts of the path/name into substrings, one substring per part of the full path/name, then there is no longer any need for the delimiters. A UNC path to a file may be: \\SMITH\COMMON\Data\Today\Myfile.dat while on OpenVMS I may refer to the same file as: SMITH::COMMON:[Data.Today]MyFile.dat It just formatting for a particular purpose.

          S 1 Reply Last reply
          0
          • P PIEBALDconsult

            Nope, just delimiters which are added when the path/name is formatted as a string for a particular purpose, primarily as aids to human readability. The delimiters do not exist in the file system itself -- definitely not in FAT at least, and probably not in any others. If someone has first name John and last name Smith, you may see it expressed as a string as "Smith, John" -- the comma is not part of either name, it is just an artifact of that particular formatting. Asking which name it is part of is nonsensical. And other purposes may require other formattings, such as: <Name First='John' Last='Smith' /> The situation is more obvious with all the various ways people format dates and times within their cultures. If you split the parts of the path/name into substrings, one substring per part of the full path/name, then there is no longer any need for the delimiters. A UNC path to a file may be: \\SMITH\COMMON\Data\Today\Myfile.dat while on OpenVMS I may refer to the same file as: SMITH::COMMON:[Data.Today]MyFile.dat It just formatting for a particular purpose.

            S Offline
            S Offline
            Slacker007
            wrote on last edited by
            #6

            I prefer: SMITHCOMMONDataTodayMyfiledat without any delimiters. Forces the file system to use black magick.

            D 1 Reply Last reply
            0
            • S Slacker007

              I prefer: SMITHCOMMONDataTodayMyfiledat without any delimiters. Forces the file system to use black magick.

              D Offline
              D Offline
              Daniel Pfeffer
              wrote on last edited by
              #7

              Why limit yourself to printable characters? There must be some non-printable Unicode characters that are acceptable to the file-system. :)

              Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

              J N 2 Replies Last reply
              0
              • R RickZeeland

                That's the point :-\

                J Offline
                J Offline
                jmaida
                wrote on last edited by
                #8

                exactly. If one saw ".for", one would expect that to be an extension reference without context, but "for" would be not be so clear as an extension. mycode.for Fortran code.

                "A little time, a little trouble, your better day" Badfinger

                1 Reply Last reply
                0
                • D Daniel Pfeffer

                  Why limit yourself to printable characters? There must be some non-printable Unicode characters that are acceptable to the file-system. :)

                  Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

                  J Offline
                  J Offline
                  jmaida
                  wrote on last edited by
                  #9

                  Hopefully not a null character

                  "A little time, a little trouble, your better day" Badfinger

                  1 Reply Last reply
                  0
                  • D Daniel Pfeffer

                    Why limit yourself to printable characters? There must be some non-printable Unicode characters that are acceptable to the file-system. :)

                    Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

                    N Offline
                    N Offline
                    Nelek
                    wrote on last edited by
                    #10

                    Why to use characters? You can directly use 1s and 0s :rolleyes:

                    M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.

                    1 Reply Last reply
                    0
                    • J jmaida

                      I am surprised by the results of straw poll. I voted that "." was part of the extension. How else would you know it was an extension? I don't get it.

                      "A little time, a little trouble, your better day" Badfinger

                      C Offline
                      C Offline
                      CodeWomble
                      wrote on last edited by
                      #11

                      I voted it was not part of the extension based on the old 8.3 filename standard. Also when describing a file I would say 'It's a PNG' rather than 'It's a .PNG' The first time I used Path.GetExtension() I was wrong about what it returns. I suspect they applied the same rules to filenames as they did to TLDs (.COM, rather than COM) etc. Oh well, no big deal. Technically it is part of the filename, but so is the extension. The bit before the last dot is the base filename. All in all, file extensions are a bit of a head-scratcher. Having file metadata as part of the filename is plain wrong.

                      1 Reply Last reply
                      0
                      • J jmaida

                        I am surprised by the results of straw poll. I voted that "." was part of the extension. How else would you know it was an extension? I don't get it.

                        "A little time, a little trouble, your better day" Badfinger

                        P Offline
                        P Offline
                        PIEBALDconsult
                        wrote on last edited by
                        #12

                        It is part of neither the name nor the extension. It is a delimiter, based on a format. You might as well ask whether the decimal point is part of the whole number or the fractional of a floating-point value. It is part of neither and its very existence is merely due to the application of a format. For example 100.5 is just one way of formatting that particular value, with some others being: 100,5 , 100 + 1/2 , 1.005E+2 .

                        T J 2 Replies Last reply
                        0
                        • P PIEBALDconsult

                          It is part of neither the name nor the extension. It is a delimiter, based on a format. You might as well ask whether the decimal point is part of the whole number or the fractional of a floating-point value. It is part of neither and its very existence is merely due to the application of a format. For example 100.5 is just one way of formatting that particular value, with some others being: 100,5 , 100 + 1/2 , 1.005E+2 .

                          T Offline
                          T Offline
                          trønderen
                          wrote on last edited by
                          #13

                          *nix file systems don't really have a concept of an 'extension', the way FAT and numerous other file systems have. A file named 'source.c' has an eight character file name, every character represented in the name field, including the dot. Because so many other file systems have an explicit 'extension', 'type' or whatever it is called, field, even *nix people have started referring to the '.c' as the extension. Technically, it isn't. It is all part of the file name. If your *nix application wants to split up the file name to two pieces and call the second piece the 'extension', your code must search for the (last) dot - which is certainly present in the file name. The file system does not see it as a separator, but as a name character.

                          1 Reply Last reply
                          0
                          • P PIEBALDconsult

                            It is part of neither the name nor the extension. It is a delimiter, based on a format. You might as well ask whether the decimal point is part of the whole number or the fractional of a floating-point value. It is part of neither and its very existence is merely due to the application of a format. For example 100.5 is just one way of formatting that particular value, with some others being: 100,5 , 100 + 1/2 , 1.005E+2 .

                            J Offline
                            J Offline
                            jmaida
                            wrote on last edited by
                            #14

                            mixing apples and oranges. Not that important. just a way to understand file names.

                            "A little time, a little trouble, your better day" Badfinger

                            1 Reply Last reply
                            0
                            Reply
                            • Reply as topic
                            Log in to reply
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes


                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • World
                            • Users
                            • Groups