Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

T const

155 views
Skip to first unread message

woodb...@gmail.com

unread,
Mar 3, 2018, 9:19:07 AM3/3/18
to
http://slashslash.info/2018/02/a-foolish-consistency/

https://www.reddit.com/r/cpp/comments/80k8hc/a_blog_rant_on_east_const/

I'm glad Jon is speaking up about this.


Brian
Ebenezer Enterprises - Enjoying programming again.
http://webEbenezer.net

woodb...@gmail.com

unread,
Jun 19, 2018, 11:19:47 AM6/19/18
to
On Saturday, March 3, 2018 at 8:19:07 AM UTC-6, woodb...@gmail.com wrote:
> http://slashslash.info/2018/02/a-foolish-consistency/
>
> https://www.reddit.com/r/cpp/comments/80k8hc/a_blog_rant_on_east_const/
>
> I'm glad Jon is speaking up about this.
>

Here's a script to help people switch to east const:

https://www.reddit.com/r/cpp/comments/8ryuee/in_case_you_want_to_migrate_from_constwest_to/

Scott Lurndal

unread,
Jun 19, 2018, 11:30:09 AM6/19/18
to
woodb...@gmail.com writes:
>On Saturday, March 3, 2018 at 8:19:07 AM UTC-6, woodb...@gmail.com wrote:
>> http://slashslash.info/2018/02/a-foolish-consistency/
>>
>> https://www.reddit.com/r/cpp/comments/80k8hc/a_blog_rant_on_east_const/
>>
>> I'm glad Jon is speaking up about this.
>>
>
>Here's a script to help people switch to east const:

Why on earth would someone want to do something so silly? Talk
about churn for the sake of churn.

Brian Wood

unread,
Oct 24, 2020, 8:17:12 PM10/24/20
to
A new name has appeared on the petition:
http://slashslash.info/petition/

in the last few months. I encourage you to join us.

Brian
https://webEbenezer.net

Bonita Montero

unread,
Oct 28, 2020, 3:11:00 PM10/28/20
to
Advocating for either style is stupid. Programmers should be able to
read both styles as both are easy to read. But programmers are often
compulsive and irrational.

Cholo Lennon

unread,
Oct 29, 2020, 11:53:35 AM10/29/20
to
IMHO irrational is a language that have more or less 10 different ways
to initialize a variable... programmers' irrationality comes from the
language.

--
Cholo Lennon
Bs.As.
ARG

Bonita Montero

unread,
Oct 29, 2020, 1:40:07 PM10/29/20
to
> IMHO irrational is a language that have more or less 10 different ways
> to initialize a variable... programmers' irrationality comes from the
> language.

The language isn't irrational. The choice for one of the variants isn't
also irrational. Irrational is to advocate to one variant if it is the
the only on logical.

Brian Wood

unread,
Oct 30, 2020, 2:12:52 AM10/30/20
to
The merits of east const have been presented in the links
posted previously. At least a few people are persuaded.
Probably there are others who haven't joined the list, but
that are likewise convinced.

Bonita Montero

unread,
Oct 30, 2020, 2:24:04 AM10/30/20
to
> The merits of east const have been presented in the links
> posted previously. At least a few people are persuaded.
> Probably there are others who haven't joined the list, but
> that are likewise convinced.

Programmers should be able to read both without any aversions.

Brian Wood

unread,
Nov 1, 2020, 4:54:03 PM11/1/20
to
But hopefully not write both.


Brian
Ebenezer Enterprises - "America isn't great because America is
powerful. America is powerful because America is great."
Ben Shapiro @ Dailywire.com

Christian Hanné

unread,
Nov 7, 2020, 4:07:01 AM11/7/20
to
East const is the only logigal way to attach constness. That's
while constness to a pointer is also attached right to the *.

Alf P. Steinbach

unread,
Nov 7, 2020, 10:17:07 AM11/7/20
to
To support consistent left `const` simply define

template< class T > using Type_ = T;

Now you can write e.g.

const Type_<const char*> s = "Aha";

But that's a construed example; in practice I'd instead write that
specific example as

const auto& s = "Aha";

... which is shorter and preserves the string length information.


- Alf

Mr Flibble

unread,
Nov 7, 2020, 3:41:39 PM11/7/20
to
Alf, pack this fucking nonsense in, pls.

/Flibble

--
¬

Brian Wood

unread,
Nov 7, 2020, 4:53:45 PM11/7/20
to
On Saturday, November 7, 2020 at 9:17:07 AM UTC-6, Alf P. Steinbach wrote:
> On 03.03.2018 15:18, woodb...@gmail.com wrote:
> > http://slashslash.info/2018/02/a-foolish-consistency/
> >
> > https://www.reddit.com/r/cpp/comments/80k8hc/a_blog_rant_on_east_const/
> >
> > I'm glad Jon is speaking up about this.
> To support consistent left `const` simply define
>
> template< class T > using Type_ = T;

What's the quote about there not being bugs in
the line you didn't write?

But would:
template< class T > using Type_ = T const;

be helfpul?


>
> Now you can write e.g.
>
> const Type_<const char*> s = "Aha";
>


Brian
Ebenezer Enterprises - Enjoying programming again.
https://github.com/Ebenezer-group/onwards

Brian Wood

unread,
Nov 7, 2020, 5:00:29 PM11/7/20
to
On Saturday, November 7, 2020 at 3:53:45 PM UTC-6, Brian Wood wrote:
> On Saturday, November 7, 2020 at 9:17:07 AM UTC-6, Alf P. Steinbach wrote:
> > On 03.03.2018 15:18, woodb...@gmail.com wrote:
> > > http://slashslash.info/2018/02/a-foolish-consistency/
> > >
> > > https://www.reddit.com/r/cpp/comments/80k8hc/a_blog_rant_on_east_const/
> > >
> > > I'm glad Jon is speaking up about this.
> > To support consistent left `const` simply define
> >
> > template< class T > using Type_ = T;
> What's the quote about there not being bugs in
> the line you didn't write?
>
> But would:
> template< class T > using Type_ = T const;
>
> be helfpul?

Not sure, but maybe the answer is no.
I think you would get:
char * const
rather than:
char const*
.

Alf P. Steinbach

unread,
Nov 8, 2020, 1:59:09 AM11/8/20
to
At times, when sausages or negativity are on your mind, it's like these
ideas prevent ordinary thinking, reducing you.

- Alf


0 new messages