Hacker News new | ask | show | jobs
by firethief 2586 days ago
> Fn* closure traits implemented for Box<dyn Fn* >

This threw me for a minute. Function pointers not using * is confusing enough without using glob syntax to talk about function types!

4 comments

Your comment was also confusing until I reached your parenthetical, because `+` is used for separating trait bounds :)
Yeah, I moved it to the top. Funny how I can't talk about the character being too overloaded because it has another meaning to the forum...

Edit: the parent comment was replying to an earlier version of my comment, in which I used + because I didn't know that * could be kind-of escaped by putting a space after it

It should work as long as there's a space after the asterisk:

> Fn* closure traits implemented for Box<dyn Fn* >

This threw me for a minute. Function pointers not using * is confusing enough without using glob syntax to talk about function types!

   Use four spaces at the
   beginning of the line *
That breaks mobile. I get a scrollable area with no scrollbars, so the content just looks clipped.
Maybe a cross-browsing bug?̊̈ I’ve never seen a browser that doesn’t scroll horizontally in mobile. In particular, I’ve used HN with iOS 12.2 Webkit and Android Google Chrome Evergreen and Chromium based browsers... Maybe a bug in Android Firefox?̊̈ (Or the browser you’re using?̊̈)
Which is why I used short lines.
Yeah, that's fine for your comment, but what I want to say isn't the same as what you said. I'm quoting a heading; it would be weird to break it in half, but it's too wide to display correctly even on my tablet.
Well, there is always:

    *mut fn(T, ...) -> U
Unless you are intentionally bringing up pointers to function pointers, this is exactly the confusion I'm talking about :)