C++ Logo

sg7

Advanced search

Re: [SG7] [isocpp-ext] P2320: "The Syntax of Static Reflection" feedback request

From: Andrew Sutton <asutton.list_at_[hidden]>
Date: Tue, 16 Feb 2021 09:10:31 -0500
> Are we sure we will never want pytlon-like :-based slicing syntax?
>

This doesn't close that door syntactically. A splice is not a postfix
operator, so you could never write:

arr[:blah:] // error: a splice is not a splice

Admittedly, the visuals of slicing a splice are interesting:

[:get_array():][2:8:2];

But I can train myself to read these for what they are.

Andrew

Received on 2021-02-16 08:10:43