comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: I am not understanding user defined exceptions
Date: Tue, 14 Feb 2017 14:07:42 -0600
Date: 2017-02-14T14:07:42-06:00	[thread overview]
Message-ID: <o7vo2e$k3t$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: o7ufnn$1oq5$1@gioia.aioe.org

"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote in message 
news:o7ufnn$1oq5$1@gioia.aioe.org...
> On 14/02/2017 00:20, Randy Brukardt wrote:
>
>> If static was a declarable property, I'd also make it possible to declare
>> user-defined static things, and apply that to all types. For instance, it
>> should be possible to have static System.Address values, static Complex
>> values, and the like. It wouldn't be limited to just whatever the 
>> language
>> designers could define.
>
> What about pure operations? The result of a pure operation with static 
> arguments is static, you don't need to declare anything upfront.

Not really, unless you are going to require the compiler to be able to 
interpret any arbitrary code (local variables, loops, gotos, etc.) whether a 
particular function can be static depends on the body. Thus you have to 
declare on the specification whether it can be used as a static function.

> Static subtype does not make much sense unless you split implicit 
> value-getter primitive operation into two: one yields the object's static 
> value, another does the object's dynamic value. However, if you let them 
> being overridden independently you might get an interesting set of 
> possibilities, e.g. building static hash tables, indexing constant strings 
> etc.

Exactly, other than I would say that there always has to be a dynamic value 
routine and the static value routine has to yield the "same" value (whatever 
"same" means in this context - that also could be user-defined) for the same 
arguments.

                                    Randy.



  reply	other threads:[~2017-02-14 20:07 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-03 20:27 I am not understanding user defined exceptions patrick
2017-02-03 21:08 ` Randy Brukardt
2017-02-03 22:41   ` patrick
2017-02-04  1:26 ` Dennis Lee Bieber
2017-02-04  6:58   ` J-P. Rosen
2017-02-04 17:08     ` Simon Wright
2017-02-08 17:55       ` Georg Bauhaus
2017-02-08 23:37         ` Randy Brukardt
2017-02-09 19:08           ` Robert A Duff
2017-02-09 21:47             ` Randy Brukardt
2017-02-09 22:52               ` Robert A Duff
2017-02-10  9:52                 ` Simon Wright
2017-02-10 10:11                   ` Dmitry A. Kazakov
2017-02-10 20:56                 ` Randy Brukardt
2017-02-10 21:09                 ` Randy Brukardt
2017-02-10 22:07                   ` Dmitry A. Kazakov
2017-02-13 23:20                     ` Randy Brukardt
2017-02-14  8:39                       ` Dmitry A. Kazakov
2017-02-14 20:07                         ` Randy Brukardt [this message]
2017-02-15  9:32                           ` Dmitry A. Kazakov
2017-02-10 23:53                   ` Shark8
2017-02-09  0:36         ` Robert A Duff
2017-02-09  7:43           ` Simon Wright
2017-02-09 19:15             ` Robert A Duff
2017-02-09 20:39               ` Randy Brukardt
2017-02-09 21:06               ` Randy Brukardt
2017-02-09 23:08                 ` Robert A Duff
2017-02-04  8:41 ` Simon Wright
replies disabled

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