Only want to say
ddcovery
antoniocabreraperez at gmail.com
Mon Jan 11 10:52:37 UTC 2021
On Monday, 4 January 2021 at 18:21:59 UTC, Ali Çehreli wrote:
> On 1/4/21 4:51 AM, ddcovery wrote:
>
> > * The in/out/body (and scope) mechanism/syntax is awesome (I
> really love
> > it)
>
> I totally agree. Just to make sure you are aware that 'body' is
> optional for a while:
>
> int foo(int i)
> in (i > 42, format!"invalid: %s"(i))
> out (result; result > 100, "oops")
> {
> // ...
> }
>
> > May be I will appreciate not opening brackets on new line
>
> I agree with you. I use "Egyption brackets" throughout my own
> code except when it helps with separation like in the code
> above. Otherwise, in/out and template constraints look too
> close to the body of the function.
>
> Ali
thanks again for the tip.
A question (May be this is something to the learn forum):
Is it possible to us in/out in a lambda expression?
More information about the Digitalmars-d
mailing list