Full Lambda Syntax without =
#793
Closed
msadeqhe
started this conversation in
Suggestions
Replies: 1 comment 1 reply
-
Also using = in namespaces declarations makes it feel like a subsequent declaration should replace the name space content, rather than extend it.
On 31 October 2023 08:23:16 Sadeq ***@***.***> wrote:
Currently Cpp2 has this terser lambda syntax:
: (x) x + 1
Would it be possible to also drop = from full lambda syntax?
: (x: i32) -> i32 { return x + 1; }
Consequently function declaration syntax would be changed too:
fnc1: (x: i32) -> i32
{
return x + 1;
}
Literally for consistency, it leads to dropping = from all other declarations too:
spc1: namespace
{
cls1: type
{
fld1: i32 = 10;
}
}
So all declarations would be less divergence from Cpp1 as discussed in #742<#742>.
—
Reply to this email directly, view it on GitHub<#793>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AALUZQOS6AT7PXFTUEMPHN3YCCYPFAVCNFSM6AAAAAA6XIZCDOVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZVG44TMOBYHE>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently Cpp2 has this terser lambda syntax:
: (x) x + 1
Would it be possible to also drop
=
from full lambda syntax?Consequently function declaration syntax would be changed too:
Literally for consistency, it leads to dropping
=
from all other declarations too:So all declarations would be less divergent from Cpp1 as discussed in #742.
Beta Was this translation helpful? Give feedback.
All reactions