Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Dave Herman’s contributions to Rust. Parent comment
> foo(x : int) : string
> since the pattern is showing foo applied to x.
kind of like the C/C++ "declaration mirrors use" thing, i.e.
int *foo;
"the result of dereferencing `foo` is of type `int`"
which is not the same as saying
foo : Ptr<int>;
i find that way of specifying types counterintuitive in both C/C++ and MLs.
There are no comments on this comment yet.
> foo(x : int) : string
> since the pattern is showing foo applied to x.
kind of like the C/C++ "declaration mirrors use" thing, i.e.
which means"the result of dereferencing `foo` is of type `int`"
which is not the same as saying
because in the former, you're kind of describing what `foo` is a without actually saying it, if that makes sense.i find that way of specifying types counterintuitive in both C/C++ and MLs.