Go has post-fix return types, but no syntax marker:
func (varname Type) retType {
}
Or if doing multiple returns:
func (varname Type) (retType1, retType2) {
}
https://github.com/golang/go/wiki/CodeReviewComments
Rust's coding style guide is [FIXME]:
https://aturon.github.io/style/README.html
However, the example code puts spaces on either side of the syntax marker:
// Function that returns a boolean value
fn is_divisible_by(lhs: u32, rhs: u32) -> bool {
// Corner case, early return
if rhs == 0 {
return false;
}
// This is an expression, the `return` keyword is not necessary here
lhs % rhs == 0
}
http://rustbyexample.com/fn.html
If I'm reading it correctly, Scala uses a colon with no preceding space:
http://www.scala-lang.org/old/node/223.html
(Disclaimer: I've never actually written in Rust or Scala.)
Those are the other postfix-return-type languages I know of off hand.
So that's one for double-padding, one for single-padding, and one N/A. :-)
On 1/5/16 1:47 PM, Jeremy Lindblom wrote:
> Hack/HHVM docs show examples with no space before:
>
https://docs.hhvm.com/hack/types/type-system
>
> Are there any other programming languages that have return types
> defined in a similar manner that we could review?
>
> --
> *Jeremy Lindblom (@jeremeamia <
https://twitter.com/jeremeamia>)*
> Software/Platform Engineer at Engrade <
https://engrade.com/> (part of
> McGraw-Hill Education <
http://www.mheducation.com/>)
> Co-founder of the Pacific Northwest PHP Conference
> <
http://pnwphp.com/> (@PNWPHP <
https://twitter.com/pnwphp>)
> Co-author of the AWS SDK for PHP
> <
http://aws.amazon.com/sdkforphp/> (@awsforphp
> <
https://twitter.com/awsforphp>)
> PHP-FIG <
http://www.php-fig.org/> Representative for the Guzzle
> <
http://guzzlephp.org/> project
>
> Looking for a senior-level software engineering position doing PHP? I
> have some available with McGraw-Hill Education in Seattle and Los
> Angeles (Santa Monica or Irvine). Contact me for me more information.
>
>
> On Tue, Jan 5, 2016 at 10:49 AM, Alexander Makarov
> <
alexande...@googlemail.com
--Larry Garfield