[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Overuse of strings

This page is part of the web mail archives of SRFI 83 from before July 7th, 2015. The new archives for SRFI 83 contain all messages, not just those from before July 7th, 2015.

   Date: Tue, 24 Jan 2006 11:51:34 -0800
   From: Per Bothner <per@xxxxxxxxxxx>
   Cc: srfi-83@xxxxxxxxxxxxxxxxx

   Lauri Alanko wrote:
   > So I suggest
   > "hello"         -> hello
   > "scheme://r6rs" -> (scheme r6rs)
   > Only users of lesser programming languages are forced to stick with
   > strings to represent identifiers and structured data.

   No, "lesser languages" (which of course also support structured data,
   if not as conveniently as Lisp/Scheme) use strings because they are
   convenient and standrd.

   The advantage of using URIs strings is that they are standard,
   universal, and familiar.

Which moves me to wonder if the Scheme Editors are planning on registering
the "scheme:" scheme with the IETF and IANA?

URI systax is an incredibly ugly thing, as anyone who has ever written a
URI parser can tell you -- but there may well be some advantage in using URIs
if there is some way to leverage all the existing URI/URL/URN
infrastructure.  I.e., if something really useful happens if someone uses
"ftp://..."; in a Scheme module.

If it is the case that there is this advantage, then the Scheme Editors
need to register "scheme:" as an official URI scheme, otherwise we won't
-really- be using URIs -- there will always be the danger that someone else
could register "scheme:" with some -other- stntax and meaning, and then we
wouldn't be able to use that new kind of URI in our Scheme modules...

   > We have symbols and s-exps. Let's use them.

   Why?  Saying something is "un-schemish" is not a reason.
   What would using symbols and s-exp gain?  What kind of
   operations would it make easier?

Almost any operation on a URI requires a URI parser.  Of course any
S-expression representation also requires a parser -- but typically a much
simpler one written in terms of `car', `cdr' and `eg?'.

- Alan