Sadeq

Results 14 comments of Sadeq

No, this bug is different than that. This bug is about the signature of `operator=` to be changed to reflect the fact of how UFCS works on `operator=`. ***EDIT:*** @JohelEGP,...

The unifying functions and blocks as explained by @hsutter in [here](https://github.com/hsutter/cppfront/issues/386#issuecomment-1518194517), will be changed like this: ```cpp f: (x: int = init) { ... } // `x` is a parameter...

No, I mean `= {...}` doesn't work in Cpp2 generally: ```cpp x: TYPE = 10; x = { /* ... */ } // Syntax error ``` Because it's meaningless to...

# More Discussion Let's discuss the new syntax if we drop `=` from declarations. ## Consistency with Control Structurs The new syntax improves consistency with control structures. For example, this...

> Today, `name: signature = statement` is used for all declarations. Today we have the following declarations: ```cpp name: signature = block-statement name: signature = statement name: signature = expression;...

> Are you also refuting defaults when = is involved? No, they can have defaults: > From [this comment](https://github.com/hsutter/cppfront/issues/824#issuecomment-1810071300): > _**EDIT:**_ For example, we can have the following lambdas: >...

# Why is it a bug? This bug report is about `= {}` in declarations. I ask to fix it by dropping `=` from them, so it leads to a...

# Why the new syntax is necessary? To fix this bug: > ```cpp > a: (x) = fnc1(); // It doesn't set/return a value! > b: (x) fnc2(); // But...

The number of up votes on [this comment](https://github.com/hsutter/cppfront/discussions/714#discussioncomment-7201812), is a data to consider that many Cpp2 programmers find `f: (x) = x;` to be more readable and understandable than `f:...