Annotation of functions
rikki cattermole
rikki at cattermole.co.nz
Tue Feb 20 12:18:47 UTC 2018
On 20/02/2018 12:15 PM, psychoticRabbit wrote:
> I've noticed that Go and Rust annotate functions.
>
> func (in go)
> fn (in rust)
>
> I was kind of wondering why they made that choice, given compilers in
> many languages do not.
>
> Would this be a useful feature in D?
>
> Everything else seems to have an annotation (e.g structs, classes.) So
> why not functions?
>
> What are people's thoughts about it?
>
> My first thought is to make it an optional annotation, for the benefit
> of developing source code analysis tools that can 'more easily' find
> functions in source code (i.e. The D compiler can just strip it off and
> do nothing with it.). That way programmers that see no benefit in it,
> don't have to deal with it.
You need a fully implemented frontend to get anything proper in terms of
parsing for D.
We're not talking about syntax highlighting here.
So the point is moot.
More information about the Digitalmars-d
mailing list