comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adam@irvine.com>
Subject: Re: Any easy/build-in construct to extract submatrices from larger matrix?
Date: Tue, 26 Jun 2012 08:19:44 -0700 (PDT)
Date: 2012-06-26T08:19:44-07:00	[thread overview]
Message-ID: <5d23a78c-4bf2-4d07-8bca-8fac2064d5af@googlegroups.com> (raw)
In-Reply-To: <wccvciekzdj.fsf@shell01.TheWorld.com>

On Tuesday, June 26, 2012 5:54:00 AM UTC-7, Robert A Duff wrote:
> 
> > http://archive.adaic.com/docs/reports/steelman/steelman.htm#2
> >
> > "Every source program shall also have a representation that
> > uses only the following 55 character subset of the ASCII graphics:
> >
> >     %&'()*+,-./:;<=>?
> >    0123456789
> >    ABCDEFGHIJKLMNOPQRSTUVWXYZ_
> >
> > "
> >
> > You see that [] were not even in the allowed character set.
> 
> And yet string literals used double quotes, aggregates use
> vertical bar, and based literals use sharp sign, even
> though I don't see any of:
> 
>     " | #
> 
> listed above.  [] were not outlawed by the above requirement,
> either.

In Ada 83, those three characters could be replaced by %, !, : respectively.  (It's still in the language as a deprecated feature; see J.2.)

I don't think it would have worked to say that [] is used for array indexing, but that they could be replaced by () if the symbols [] weren't available.  The reason was is that changing [] to () would introduce some ambiguities where none existed before, which I think would really screw up the overload resolution rules.  (Suppose you have two functions F, one that takes an integer parameter and returns an integer, and one that takes no parameters and returns a array of integer or an access to an array of integer.  Now, if [] were used as the array index, with no replacement allowed?  F(3) would unambiguously call the F that takes a parameter and F[3] would unambiguously call the parameterless F that returns an array or access-array.  But what if the rules said that [ and ] could be relaced by ( and )?  What would the rules say about F(3) now?  I think this would be too confusing.)  Another possibility would be to say that [ and ] could be replaced by two-character sequences such as, for instance, (: and :)   This would be unambiguous because smileys hadn't yet been invented.  I think that would have worked but I guess nobody thought of that.

                                  -- Adam
 



  reply	other threads:[~2012-06-26 15:19 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-24  8:05 Any easy/build-in construct to extract submatrices from larger matrix? Nasser M. Abbasi
2012-06-24  8:24 ` Dmitry A. Kazakov
2012-06-24  8:55   ` Nasser M. Abbasi
2012-06-24 11:10     ` Dmitry A. Kazakov
2012-06-24 12:16       ` Nasser M. Abbasi
2012-06-24 16:11         ` Dmitry A. Kazakov
2012-06-24 17:14           ` Nasser M. Abbasi
2012-06-24 18:33             ` Dmitry A. Kazakov
2012-06-25  5:44             ` J-P. Rosen
2012-06-25  6:32               ` Nasser M. Abbasi
2012-06-25  7:54                 ` J-P. Rosen
2012-06-25  8:20                   ` Dmitry A. Kazakov
2012-06-25 14:21                   ` Nasser M. Abbasi
2012-06-25  8:36                 ` Georg Bauhaus
2012-06-25 13:17                   ` Nasser M. Abbasi
2012-06-26 11:44                     ` Georg Bauhaus
2012-06-25 16:49                 ` Pascal Obry
2012-06-25 17:36                   ` Nasser M. Abbasi
2012-06-25 18:49                     ` stefan-lucks
2012-06-26  4:41                       ` Nasser M. Abbasi
2012-06-26  7:15                 ` Jacob Sparre Andersen
2012-06-26  9:51                   ` Nasser M. Abbasi
2012-06-25  9:33               ` Simon Wright
2012-06-26  2:48 ` Jerry
2012-06-26  4:19   ` Nasser M. Abbasi
2012-06-26  7:06   ` Nasser M. Abbasi
2012-06-26 12:54     ` Robert A Duff
2012-06-26 15:19       ` Adam Beneschan [this message]
2012-06-26 21:14         ` Robert A Duff
2012-06-27 23:42     ` Shark8
2012-06-26  7:10   ` Dmitry A. Kazakov
2012-06-26 15:06   ` Adam Beneschan
2012-06-26 21:19     ` Robert A Duff
2012-06-26 21:40       ` Adam Beneschan
2012-07-03  4:22         ` Randy Brukardt
2012-07-03  8:37           ` Dmitry A. Kazakov
2012-07-05  1:33             ` Randy Brukardt
2012-07-05  7:08               ` Dmitry A. Kazakov
2012-07-06 23:47                 ` Randy Brukardt
2012-07-07  8:22                   ` Dmitry A. Kazakov
2012-07-05 18:56               ` Adam Beneschan
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox