From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Q: type ... is new String
Date: Mon, 4 Jun 2012 11:09:43 +0200
Date: 2012-06-04T11:09:43+02:00 [thread overview]
Message-ID: <mc576khy04px$.1ew0fdx4snp34$.dlg@40tude.net> (raw)
In-Reply-To: op.wfdc65awule2fv@douda-yannick
On Mon, 04 Jun 2012 10:14:55 +0200, Yannick Duch�ne (Hibou57) wrote:
> A path is intently a string is all platform I know,
RSX-11 had path of two letter device, two numbers of the directory,
RADIX-50 encoded file name, extension and numeric version. E.g.
DX:[1,54]HELLO.ADA;4. Neither part of this was ASCII string. And path
weren't stored anywhere if "internally" meant "kept on the magnetic
carrier."
> A string and a file's path belongs to the same class.
I prefer separate types for path, device, file name, for absolute and
relative paths.
A common class with strings may be present per conversions between strings
and paths. E.g. a path with non-Latin1 letters to String would raise
Constraint_Error.
However, if typed properly, you better have no implicit conversions to
strings at all. If you look into it, strings are actually used as a
middleman for rendering, I/O etc. A comprehensive design may need no such
thing. E.g. you would write paths directly to a text file and read them
from there back as you do with numbers.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
next prev parent reply other threads:[~2012-06-04 9:09 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-30 16:33 Q: type ... is new String tmoran
2012-05-30 17:04 ` Dmitry A. Kazakov
2012-05-31 7:37 ` Maciej Sobczak
2012-06-04 5:58 ` Yannick Duchêne (Hibou57)
2012-06-04 6:30 ` J-P. Rosen
2012-06-04 7:48 ` Yannick Duchêne (Hibou57)
2012-06-04 8:03 ` Dmitry A. Kazakov
2012-06-04 8:14 ` Yannick Duchêne (Hibou57)
2012-06-04 9:09 ` Dmitry A. Kazakov [this message]
2012-06-04 10:35 ` J-P. Rosen
2012-06-04 5:43 ` Yannick Duchêne (Hibou57)
2012-06-04 11:39 ` Brian Drummond
2012-06-04 13:36 ` Maciej Sobczak
2012-06-04 14:58 ` Georg Bauhaus
2012-06-04 15:14 ` Dmitry A. Kazakov
2012-06-04 16:06 ` Georg Bauhaus
2012-06-04 17:05 ` Dmitry A. Kazakov
2012-06-04 20:28 ` Yannick Duchêne (Hibou57)
2012-06-04 20:56 ` Georg Bauhaus
2012-06-05 7:32 ` Dmitry A. Kazakov
2012-06-05 8:40 ` Georg Bauhaus
2012-06-05 9:06 ` Dmitry A. Kazakov
2012-06-05 12:20 ` Georg Bauhaus
2012-06-05 13:14 ` Dmitry A. Kazakov
2012-06-06 4:09 ` Shark8
2012-06-06 8:52 ` Georg Bauhaus
2012-06-06 23:56 ` Randy Brukardt
2012-06-07 11:15 ` Georg Bauhaus
2012-06-06 23:51 ` Randy Brukardt
2012-06-04 20:33 ` Yannick Duchêne (Hibou57)
2012-06-04 21:27 ` Georg Bauhaus
[not found] ` <m9kqs7hgii13e220b1phm46n43d92tu1pj@invalid.netcom.com>
2012-06-05 6:15 ` Georg Bauhaus
2012-06-05 6:36 ` Yannick Duchêne (Hibou57)
2012-06-06 4:14 ` Shark8
2012-06-07 0:01 ` Randy Brukardt
2012-06-07 0:20 ` Adam Beneschan
2012-06-05 12:05 ` Brian Drummond
2012-06-05 14:43 ` Yannick Duchêne (Hibou57)
2012-06-04 15:54 ` Shark8
2012-06-04 22:01 ` Jeffrey Carter
2012-06-05 12:10 ` Brian Drummond
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox