comp.lang.ada
 help / color / mirror / Atom feed
From: briot.emmanuel@gmail.com
Subject: Re: Mixing operators and dot notation
Date: Mon, 6 Jun 2016 01:10:17 -0700 (PDT)
Date: 2016-06-06T01:10:17-07:00	[thread overview]
Message-ID: <03122e74-1f33-4a94-9d38-ea0dbe3f7658@googlegroups.com> (raw)
In-Reply-To: <niroh2$43q$1@dont-email.me>

> To give you the essence. I'm back to trying to get a minimal ReactiveX 
> (http://reactivex.io)-like thing working. The gist is that you can chain 
> many transformation operations:
> 
> SourceType.Generate_Data
>     .Op1 (...)
>     ...
>     .OpN (...)
>     .Endpoint (Operate_With_Resulting_Transformed_Data);


Funny, I have been playing with exactly the same purpose recently
although I only started from the promises pattern, which I am now
extending.

https://github.com/briot/Ada-promises


I had exactly the same problems you had, and copy with using operators,
so my current syntax is:

      Get_Promise
           and new Op1
           and (new Op2 & new Op3)
           and new Endpoint;

(using tagged types for the operations). That's because things need to be
type safe as well, so the operations are declared in generic packages,
and therefore we can't use the dot notation here. I believe there could be
some extension to the language here.

Emmanuel


  parent reply	other threads:[~2016-06-06  8:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-02 21:38 Mixing operators and dot notation Alejandro R. Mosteo
2016-06-02 21:42 ` Alejandro R. Mosteo
2016-06-02 22:28 ` Robert A Duff
2016-06-02 23:26   ` Randy Brukardt
2016-06-03 11:09     ` Alejandro R. Mosteo
2016-06-03 12:19       ` Dmitry A. Kazakov
2016-06-03 14:45       ` G.B.
2016-06-03 17:31       ` Shark8
2016-06-03 20:41         ` Alejandro R. Mosteo
2016-06-06  8:14           ` briot.emmanuel
2016-06-06 13:51             ` Alejandro R. Mosteo
2016-06-07 11:24             ` Traits and iterators (was: Mixing operators and dot notation) Alejandro R. Mosteo
2016-06-08  7:31               ` briot.emmanuel
2016-06-08 11:18                 ` Traits and iterators Alejandro R. Mosteo
2016-06-06  8:10       ` briot.emmanuel [this message]
2016-06-06 13:58         ` Mixing operators and dot notation Alejandro R. Mosteo
2016-06-02 23:05 ` Jeffrey R. Carter
replies disabled

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