From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Re: discriminant questions
Date: Tue, 27 Sep 2011 17:11:03 +0200
Date: 2011-09-27T17:11:04+02:00 [thread overview]
Message-ID: <4e81e788$0$6542$9b4e6d93@newsspool4.arcor-online.net> (raw)
In-Reply-To: <ogp909d9zu0j$.14hfi4vzo0slt.dlg@40tude.net>
On 27.09.11 14:14, Dmitry A. Kazakov wrote:
> On Tue, 27 Sep 2011 12:18:28 +0200, Georg Bauhaus wrote:
>
>> On 27.09.11 10:10, Dmitry A. Kazakov wrote:
>>
>>> Consider a type system where your precious kludges of old Ada would become
>>> some type expressions and library implementations rather than built-in
>>> stuff.
>>
>> In the opposite direction, an alternative effort would set out
>> to find language for the field tested patterns hidden in libraries.
>
> No the opposite direction is to have built-in "patterns".
That's what I meant to say; to design some language for those "patterns"
being now "emulated" in libraries seems harder. Harder because you need
to decide that (1) This is it! and (2) Though shalt not be a language
designer, but a programmer. Even when you write reusable libraries.
These built-ins might be harder for compiler makers to implement, IIUC.
A use case:
"Run these independent procedures concurrently. They share
one variable."
With a normal, practical programmer in mind, a typical "pattern"
of language extension into the domain of concurrency is to enable
writing, in pseudo code:
concurrent procedure one (a, b: input; c: out output) is
begin
...
lock shared.do(b, 42) end lock;
...
end;
This reuses the notion of "procedure", the word "concurrent" being a hint,
the lock being automatic; critical region isolated, perfectly easy!
(If lousy, but quality issues needs to be addressed with care.)
Now in Ada, they tell you to write a task,
task one is
begin
...
(interrupting) "Where do I put a, b, and c?" "In entries, moment please!"
... "Oh, gosh, more mechanism, why can't it be easy?" "OK, wait:
task worker is
begin
one (a, b, c);
end;
Does this look easy?" "OK, where do a, b, c come from?" "You make
them visible, the task could be local :
procedure one
(a, b: input;
c: output)
is
task worker is
begin
...
end;
begin
null;
end;"
"OK (boring, verbose, so many ways), how about the shared variable?"
"Just define a protected object." "What?"
... etc
The increasingly annoyed questioner might be right or wrong
from a software engineering point of view, the language design
will have to address his concerns or else he does not buy.
A library, or a pattern, might seem to help:
task type Run_Once
(job : access procedure (a, b: input; c : out output))
is
pragma Storage_Size (N);
end Run_Once;
But when is `c` filled? So you end up explaining tasks
and protected objects anyway. And you might be able to explain
why seemingly advantageous "primitives" like "concurrent" and
"lock" had been preferred to a library based approach.
> It is also interesting how non-implemented "patterns", and as I understand,
> your desire is to keep them such, could be tested in the field, before
> being incorporated into the language core? Was for example limited type
> return tested in the field? Accessibility rules? Anonymous access types?
At Ada-auth, they usually say something about customer response to
implementation defined pragmas and such. I should hope that new
languages are made the way that matches the way a certain requirements
document was made, reviewed, parts dismissed, reviewed again, compared,
etc.
next prev parent reply other threads:[~2011-09-27 15:11 UTC|newest]
Thread overview: 89+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-17 16:30 discriminant questions ytomino
2011-09-17 17:19 ` Dmitry A. Kazakov
2011-09-17 17:46 ` ytomino
2011-09-17 19:41 ` Dmitry A. Kazakov
2011-09-17 22:55 ` ytomino
2011-09-18 8:50 ` Dmitry A. Kazakov
2011-09-18 10:54 ` ytomino
2011-09-18 11:35 ` Dmitry A. Kazakov
2011-09-18 12:41 ` ytomino
2011-09-18 13:17 ` Dmitry A. Kazakov
2011-09-18 16:22 ` ytomino
2011-09-18 16:32 ` ytomino
2011-09-18 18:15 ` Dmitry A. Kazakov
2011-09-18 23:44 ` ytomino
2011-09-19 7:27 ` Dmitry A. Kazakov
2011-09-18 14:43 ` Dmitry A. Kazakov
2011-09-18 16:46 ` Robert A Duff
2011-09-18 18:01 ` Dmitry A. Kazakov
2011-09-18 19:20 ` Maciej Sobczak
2011-09-19 7:39 ` Dmitry A. Kazakov
2011-09-19 20:00 ` Maciej Sobczak
2011-09-20 7:33 ` Dmitry A. Kazakov
2011-09-20 15:45 ` Maciej Sobczak
2011-09-20 16:48 ` Dmitry A. Kazakov
2011-09-20 20:19 ` Maciej Sobczak
2011-09-21 7:48 ` Dmitry A. Kazakov
2011-09-21 20:51 ` Maciej Sobczak
2011-09-22 8:07 ` Dmitry A. Kazakov
2011-09-22 20:57 ` Maciej Sobczak
2011-09-23 7:59 ` Dmitry A. Kazakov
2011-09-23 10:57 ` Georg Bauhaus
2011-09-23 22:30 ` Randy Brukardt
2011-09-23 22:50 ` Randy Brukardt
2011-09-24 6:46 ` Dmitry A. Kazakov
2011-09-26 22:48 ` Randy Brukardt
2011-09-27 8:10 ` Dmitry A. Kazakov
2011-09-27 10:18 ` Georg Bauhaus
2011-09-27 12:14 ` Dmitry A. Kazakov
2011-09-27 15:11 ` Georg Bauhaus [this message]
2011-09-27 15:38 ` Dmitry A. Kazakov
2011-09-27 18:06 ` Georg Bauhaus
2011-09-27 19:06 ` Dmitry A. Kazakov
2011-09-29 0:01 ` Georg Bauhaus
2011-09-29 8:26 ` Dmitry A. Kazakov
2011-09-30 1:24 ` Randy Brukardt
2011-09-30 8:10 ` Dmitry A. Kazakov
2011-09-30 10:07 ` Georg Bauhaus
2011-09-30 12:38 ` Dmitry A. Kazakov
2011-09-30 17:40 ` Georg Bauhaus
2011-09-30 18:55 ` Dmitry A. Kazakov
2011-09-23 9:23 ` Stephen Leake
2011-09-23 9:48 ` Dmitry A. Kazakov
2011-09-23 22:42 ` Randy Brukardt
2011-09-24 6:56 ` Dmitry A. Kazakov
2011-09-26 22:43 ` Randy Brukardt
2011-09-24 10:47 ` Stephen Leake
2011-09-24 12:54 ` Simon Wright
2011-09-24 14:46 ` Dmitry A. Kazakov
2011-09-24 16:21 ` Simon Wright
2011-09-24 16:43 ` Dmitry A. Kazakov
2011-09-22 2:52 ` Randy Brukardt
2011-09-22 8:11 ` Dmitry A. Kazakov
2011-09-20 0:01 ` Randy Brukardt
2011-09-20 7:38 ` Dmitry A. Kazakov
2011-09-20 11:11 ` AdaMagica
2011-09-20 12:09 ` Dmitry A. Kazakov
2011-09-20 12:31 ` AdaMagica
2011-09-20 12:57 ` Dmitry A. Kazakov
2011-09-20 23:28 ` ytomino
2011-09-21 5:03 ` AdaMagica
2011-09-21 8:08 ` Dmitry A. Kazakov
2011-09-21 10:03 ` Georg Bauhaus
2011-09-21 10:29 ` Dmitry A. Kazakov
2011-09-22 3:21 ` Randy Brukardt
2011-09-22 3:05 ` Randy Brukardt
2011-09-19 23:35 ` Randy Brukardt
2011-09-20 21:39 ` ytomino
2011-09-22 3:32 ` Randy Brukardt
2011-09-18 16:32 ` ytomino
2011-09-19 14:46 ` ytomino
2011-09-19 15:14 ` Dmitry A. Kazakov
2011-09-19 17:49 ` ytomino
2011-09-20 7:29 ` Georg Bauhaus
2011-09-20 19:50 ` ytomino
2011-09-20 8:08 ` Dmitry A. Kazakov
2011-09-20 18:47 ` ytomino
2011-09-21 8:16 ` Dmitry A. Kazakov
2011-09-21 9:55 ` ytomino
2011-09-22 3:26 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox