5 ms·
Shipping Const Generics in 2020
- navaati 6y agoOh yessss. Will this allow for the much wanted "move iterator on arrays" ?
- Rusky 6y agoYes: https://github.com/rust-lang/rust/pull/65819 https://github.com/rust-lang/rust/pull/65819
- topher200 6y ago@dang Can we add [Rust] to the title?
- tptacek 6y agoThat's not a thing we do here.
- saurik 6y ago(I am someone who clicked on this mostly to find out what language it was for and was disappointed it was Rust.) My solution to this problem--which I consider to be pretty serious: the best title for your blog is one that elides any context assumed by all of your posts, but then it is difficult to get Hacker News to appreciate a post about it due to the insane "exactly match the title" rule (which I one time caused serious problems for as I posted an article on Google+, which didn't have titles, and submitted the article myself here with a title, and no one even knew what to do)--is the next time I publish an article I am going to special case people coming from Hacker News and just give them a different website with a different title. (But the fact that I have to do that is ridiculous, and only works because Hacker News is so popular that it can one-offed.)
- tptacek 6y ago"Exactly match the title" is not in fact the rule on HN.
- saurik 6y agoAnd yet adding "[Rust]" is "not a thing we do here", so you are (as usual) being needlessly pedantic (and curt) with the goal of being correct, but unhelpful.
- tptacek 6y agoI don't see the connection between the two statements. We very deliberately don't tag posts with categories; "non-siloed" is part of the ethos of the site. Meanwhile: dogged adherence to original titles is not the rule, nor is it the spirit of the rule; the spirit of the rule is "the submitter of an article has no privilege to editorialize; submissions are community property". So the rule is "please use original titles, unless they're misleading or linkbait". And, indeed, you'll see stories here that don't use the <title> all the time.
- tomjakubowski 6y agoYou could have done a much better job in your original comment saying that explicit categorization is what "we don't do here," not the changing of titles.
- tptacek 6y agoEh, I think we all did fine.
- zokier 6y ago> Based on the pattern passed to the map function, the compiler figures out that the first call to array_chunks should chunk the data into an iterator of arrays with length 2, and in the second call it should be an iterator of arrays with length 3. It’s so cool! Cool, but bit too implicit to my taste. But regardless, const generics are definitely one of the biggest features I've been looking forwards to (more so than e.g. async stuff that got all the hype), so glad to see stuff landing even with the restrictions.
- pcwalton 6y agoTo be clear, that pattern more or less falls out naturally from stuff that the typechecker already has to do to make const generics work in the type system. It's not so much a special feature as it is just the interaction of plain old type inference with const generics.
- mproud 6y agoFor a second, I thought this said “Shipping cost” and was talking about generic drugs.
- cryptonector 6y agoThis is very nice!