Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #82876

Re: Hello World in Russian

Subject Re: Hello World in Russian
Newsgroups comp.lang.c++
References (2 earlier) <st3n3o$cn4$1@dont-email.me> <st5rkq$25sa3$1@gwaiyur.mb-net.net> <st6058$ri2$1@dont-email.me> <IQwJJ.361631$aF1.324669@fx98.iad> <st6dub$4pd$1@dont-email.me>
From Richard Damon <Richard@Damon-Family.org>
Message-ID <PiAJJ.20601$OF3.3742@fx14.iad> (permalink)
Organization Forte - www.forteinc.com
Date 2022-01-30 12:56 -0500

Show all headers | View raw


On 1/30/22 11:21 AM, Paavo Helde wrote:
> 30.01.2022 15:59 Richard Damon kirjutas:
>> On 1/30/22 7:26 AM, Paavo Helde wrote:
>>
>>> The slash can be still used as an option, there is no need to change 
>>> that. One just needs to start to demand to separate options by 
>>> spaces, something what a sane person has always done anyway, so that
>>>
>>> dir C:/B
>>>
>>> would list the file B in the root folder and
>>>
>>> dir C: /B
>>>
>>> would list all files in cwd of C: in bare format.
>>>
>>
>> and what should dir /B do?
> 
> In 'dir /B', /B would be an option. To specify a file, one would need to 
> use 'dir C:/B' for example. That's the same as needing to use special 
> syntax like 'ls ./-filename' in Unix for filenames starting with a dash.

But that isn't the same!!!

It might need to be dir A:/B or dir B:/B or D:/D, the omission of the 
drive is an intentional feature.

> 
>>
>> Both path and options are optional.
>>
>>
>> When it was decided to use / as the options separator, it essentially 
>> forced the use of some other character for the directory separator in 
>> that context.
> 
> IIRC, / as the option separator came from an OS (CP/M?) which did not 
> support subdirectories, so there was no problem at that point.

Right, and backwards compatibility can be a bitch.

I thought CP/M did eventually add sub-directories as file system got 
bigger, they just weren't that needed initially on the small 8" floppy 
with only 1/4 MB of storage.

Also, when CP/M started, Unix was a small niche OS so compatibility with 
it wasn't that important, at that time there were LOTS of different and 
incompatible systems in use.

> 
>>
>> In hindsight, maybe it was the wrong choice, but that was a LONG time 
>> ago.
>>
>> But remember, at that point in time filenames were 8.3 ASCII only, 
>> with limited special characters. Using - in the file name as a 'word' 
>> separator wasn't uncommon, so - was an allowed filename character, so 
>> not good for the option leadin character, that would make dir -B 
>> ambiguous, so using / made some sense.
> 
> Even though '-' is allowed in file names, I believe there has never been 
> many people wanting to *start* their filenames with it.

It was a common character to put things at the top of the alphabetical 
sort list. -README.TXT was at one point a very common file name.

> 
> Also, '-' is allowed in Unix file names as well, and they can somehow 
> cope with this, see the ./-filename example above.

Yes, and ./ always works to indicate a file in the current directory 
(but does normally kill path lookups if applicable for the file), the 
problem is adding C: as a prefix doesn't always work, and definitely 
wouldn't on the early systems, it would have more likely have been A: 
then (but might have been B:)

> 
> Of course it is hard to foresee all future implications of current 
> decisions. But when it becomes clear some decision was wrong, it should 
> be corrected, with some gradual switch-over period if needed. For 
> example, the Windows Explorer and standard file dialogs could easily 
> have a regime to display file paths with forward slashes. This would 
> make my life a bit easier, for copy-pasting file paths from-to Cygwin 
> bash terminal or program code. I also keep hearing Windows has a Linux 
> inside nowadays, I am sure it is also using forward slashes.

Note, that operation system itself supports using either / or \ as the 
path separator, and I thought there was even an system option (just not 
set by default) to change the option character from / to -, so you CAN 
do what you want, it just isn't that way be default.

Back to comp.lang.c++ | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Hello World in Russian Joseph Hesse <joeh@gmail.com> - 2022-01-29 05:51 +0200
  Re: Hello World in Russian James Kuyper <jameskuyper@alumni.caltech.edu> - 2022-01-28 23:27 -0500
    Re: Hello World in Russian Muttley@dastardlyhq.com - 2022-01-29 10:21 +0000
  Re: Hello World in Russian Andrey Tarasevich <andreytarasevich@hotmail.com> - 2022-01-28 22:42 -0800
    Re: Hello World in Russian David Brown <david.brown@hesbynett.no> - 2022-01-29 13:01 +0100
      Re: Hello World in Russian "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2022-01-29 14:12 +0100
        Re: Hello World in Russian David Brown <david.brown@hesbynett.no> - 2022-01-29 17:34 +0100
      Re: Hello World in Russian James Kuyper <jameskuyper@alumni.caltech.edu> - 2022-01-30 14:17 -0500
        Re: Hello World in Russian Andrey Tarasevich <andreytarasevich@hotmail.com> - 2022-01-30 20:17 -0800
  Re: Hello World in Russian "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2022-01-29 11:48 +0100
    Re: Hello World in Russian Paavo Helde <eesnimi@osa.pri.ee> - 2022-01-29 17:39 +0200
      Re: Hello World in Russian "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2022-01-30 09:18 +0100
        Re: Hello World in Russian Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-01-30 12:12 +0000
          Re: Hello World in Russian "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2022-01-30 14:02 +0100
            Re: Hello World in Russian Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-01-30 14:45 +0000
              Re: Hello World in Russian "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2022-01-30 21:53 +0100
                Re: Hello World in Russian Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-01-30 21:00 +0000
            Re: Hello World in Russian James Kuyper <jameskuyper@alumni.caltech.edu> - 2022-01-30 14:02 -0500
          Re: Hello World in Russian Muttley@dastardlyhq.com - 2022-01-31 10:23 +0000
            Re: Hello World in Russian scott@slp53.sl.home (Scott Lurndal) - 2022-01-31 16:11 +0000
              Re: Hello World in Russian Muttley@dastardlyhq.com - 2022-01-31 16:36 +0000
              Re: Hello World in Russian Paavo Helde <eesnimi@osa.pri.ee> - 2022-01-31 20:20 +0200
            Re: Hello World in Russian Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-01-31 16:12 +0000
              Re: Hello World in Russian Muttley@dastardlyhq.com - 2022-01-31 16:39 +0000
                Re: Hello World in Russian Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-01-31 23:47 +0000
        Re: Hello World in Russian Manfred <noname@add.invalid> - 2022-01-31 16:45 +0100
        Re: Hello World in Russian Andrey Tarasevich <andreytarasevich@hotmail.com> - 2022-01-31 10:10 -0800
          Re: Hello World in Russian "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2022-01-31 19:25 +0100
      Re: Hello World in Russian Marcel Mueller <news.5.maazl@spamgourmet.org> - 2022-01-30 12:09 +0100
        Re: Hello World in Russian Paavo Helde <eesnimi@osa.pri.ee> - 2022-01-30 14:26 +0200
          Re: Hello World in Russian Richard Damon <Richard@Damon-Family.org> - 2022-01-30 08:59 -0500
            Re: Hello World in Russian Paavo Helde <eesnimi@osa.pri.ee> - 2022-01-30 18:21 +0200
              Re: Hello World in Russian Richard Damon <Richard@Damon-Family.org> - 2022-01-30 12:56 -0500
                Re: Hello World in Russian Vir Campestris <vir.campestris@invalid.invalid> - 2022-02-07 21:05 +0000

csiph-web