C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Alternative Free Function Calling Syntax.

From: Tiago Freire <tmiguelf_at_[hidden]>
Date: Mon, 29 Sep 2025 05:41:07 +0000
After looking at the proposal, unfortunately I have to agree, it's a mess. No thanks.
________________________________
From: Std-Proposals <std-proposals-bounces_at_[hidden]socpp.org> on behalf of Jarrad Waterloo via Std-Proposals <std-proposals_at_[hidden]>
Sent: Sunday, September 28, 2025 6:01:18 PM
To: std-proposals_at_[hidden] <std-proposals_at_[hidden]>
Cc: Jarrad Waterloo <descender76_at_[hidden]>; Bad At The Game <inheritanceiskey_at_[hidden]>
Subject: Re: [std-proposals] Alternative Free Function Calling Syntax.

Bad At The Game,

Do you have a response for https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p3027r0.html "UFCS is a breaking change, of the absolutely worst kind"?


On Sun, Sep 28, 2025 at 11:13 AM Bad At The Game via Std-Proposals <std-proposals_at_[hidden]<mailto:std-proposals_at_[hidden]>> wrote:
Hi, I tried to take another approach at UFCS, Here

https://github.com/ZXShady/proposals/blob/main/alternative_free_function_call_syntax.md

It isn't professionally written I tried my best.

I like free functions but I don't like them syntax wise, I prefer left to right reading in most cases than inside out and sometimes left to right at same time.

```cpp
    auto collisions = getCollisionBoxes(expanded(translated(aabb, position), vel), dimension, block_registry);
```

this is hard to read but I don't want to have intermediary variables that have no meaningful names.

While with that proposal it would allow
```cpp
auto collisions = aabb.
                      .math::translated(position)
                      .math::expanded(vel)
             .gameLogic::getCollisionBoxes(dimension, block_registry);
```




--
Std-Proposals mailing list
Std-Proposals_at_[hidden]<mailto:Std-Proposals_at_[hidden]>
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals

Received on 2025-09-29 05:41:14