News for hackers. Stuff that matters.
Re:C++17 – better than you might think by koja86 on Thursday December 29, 2016 @06:45AM (#13276816)
You might find this project kind of interesting:

https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...

As a day-to-day C++ practitioner I like it.

...Yet I am not fully convinced that the general idea of language evolution implemented as ruleset outside of the language itself is the way to go. Seems more like band-aid to me and made me start to think about concept of programming language's life cycle in context of Darwinian evolution - once either legacy compatibility burden is too big or that particular biotope of specific problems the language solves better than others vanishes/changes the language dies out.

My particular issue with C++ is that it's complexity, longevity and evolution made possible for widespread bad-practices as not every C++ developer evolved as much as the language itself and it's general public understanding. (Some current best-practices were simply not always widely known or accepted.) I would even go as far to say that most of existing C++ code is crap (at least from standpoint of today "modern" C++).

And that's why I am both eagerly looking to "next generation" being shaped up by people who has (hopefully) learnt from past mistakes and used by people who care (itching to give Rust a ride once it stabilizes just a bit more) and also occasionally digging in the history for possible gems that I might not able to see without my current experience (platonic weekends-only relationship with Haskell, Lisp being right there at top of my TODO list).

EDIT: Removed the sir.

Re:C++17 – better than you might think by Koshkin on Thursday December 29, 2016 @10:09AM (#13277632)
> I am not fully convinced that the general idea of language evolution implemented as ruleset outside of the language itself is the way to go

I think you are right - as far as 'the' language is concerned. The complexity (and the slowness) of a C++ compiler now is mostly due to the complexity - and the slowness - of the built-in interpreter of the template meta-language. There are other, saner languages, such as Common Lisp, where the meta-language is indistinguishable from the language itself, which, in addition to its greater simplicity, greatly contributes to the reasonable compile times. In the C/C++ land, it might have been possible to use a similar approach instead of introducing a separate macro/template syntax, a good example being the approach taken in the design of ASP (active server pages), PHP, and the like.

Re:C++17 – better than you might think by rl3 on Thursday December 29, 2016 @07:15AM (#13276887)
>Sir, ...

You may want to take a quick gander at the profile of whom you're replying to. :)

>... itching to give Rust a ride once it stabilizes just a bit more ...

Likewise, though from my limited research it seems Rust has legacy baggage of its own already, and there's difficulty in coming to a consensus on what qualifies as idiomatic Rust. It seems that the same principle of cherry-picking a subset of features would apply just the same to Rust as it does to C++. The latter being far messier, of course.

Re:C++17 – better than you might think by echelon on Thursday December 29, 2016 @10:07AM (#13277618)
> it seems Rust has legacy baggage of its own already

What is considered legacy cruft in Rust? The only change I'm aware of was the introduction of the `?` operator to replace the `try!` macro. That's easy to find/replace.

Re:C++17 – better than you might think by rl3 on Thursday December 29, 2016 @03:32PM (#13279878)
The notion extends to official libraries, not just the language itself. That said, I'm not the best person to ask, but cursory research turns up a few examples.[0][1][2][3]

Some of these aren't examples of legacy cruft per se. However, as complexity is added to a language at a rapid rate, there becomes more confusion over what best practice actually is.

[0] https://www.reddit.com/r/rust/comments/2r7ttq/where_to_find_...

[1] https://users.rust-lang.org/t/rust-version-support-in-librar...

[2] https://gist.github.com/lifthrasiir/cedb5db8dbcd209c5957

[3] https://users.rust-lang.org/t/is-this-idiomatic-rust/2155

Re:C++17 – better than you might think by koja86 on Thursday December 29, 2016 @08:33AM (#13277142)
Thank you in both cases sir/madam/whatever :-)
Re:C++17 – better than you might think by adelarsq on Thursday December 29, 2016 @08:53AM (#13277230)
Some things still are on nightly builds, so will take some time to be perfect, at least for me. I have plans to use in production on next months =)
Re:C++17 – better than you might think by SomeStupidPoint on Thursday December 29, 2016 @10:04AM (#13277600)
Just to point out: biological evolution uses changes in the base features utilized (epigenetics) to speed adaptability to changing environments (or new environments).

There's every reason to think that evolving human systems should use similar masks on features of a technology to make it more suitable for a particular domain and serve as a signal to drive the base evolution.

The restricted C subset used for safety critical systems I think is a good example of this -- the restriction allows for usage in a domain where the full set of features is a disadvantage.

Re:C++17 – better than you might think by enqk on Thursday December 29, 2016 @09:16AM (#13277355)
> ...Yet I am not fully convinced that the general idea of language evolution implemented as ruleset outside of the language itself is the way to go.

What most people nowadays recommend programming in is actually not C++, and actually C++ + all compiler warnings, which is in itself an extension/evolution/restriction of the underlying language. So it's not so far out to go from there to externalizing more rules around valid programs.

Re:C++17 – better than you might think by akavel on Thursday December 29, 2016 @07:53AM (#13276994)
Is anybody aware of any compiler/tool which tries to enforce those rules? ideally, on code blocks enclosed in some special markers?
Re:C++17 – better than you might think by RossBencina on Thursday December 29, 2016 @08:14AM (#13277071)
Clang-Tidy [0], in particular see the cppcoreguidelines.* checks [1]

[0] http://clang.llvm.org/extra/clang-tidy/

[1] http://clang.llvm.org/extra/clang-tidy/checks/list.html