How can we make it easier to experiment with the compiler?
Iain Buclaw
ibuclaw at gdcproject.org
Tue May 25 07:39:00 UTC 2021
On Tuesday, 25 May 2021 at 00:03:56 UTC, Walter Bright wrote:
> On 5/24/2021 2:01 PM, Max Haughton wrote:
>> Where do you start?
>
> At the first function you notice that has poor/missing/wrong
> documentation.
>
> Like this one I just did:
>
> https://github.com/dlang/dmd/pull/12570
Another place you can make a big impact with zero change in
language behavior is this:
```
Error: none of the overloads of size are callable using a const
object, candidates are:
dmd.mtype.Type.size()
dmd.mtype.Type.size(ref const(Loc) loc)
Error: mutable method dmd.mtype.TypeVector.elementType is not
callable using a const object
Consider adding const or inout here
Error: mutable method dmd.mtype.TypeVector.isscalar is not
callable using a const object
Consider adding const or inout here
Error: mutable method dmd.mtype.TypeVector.isintegral is not
callable using a const object
Consider adding const or inout here
Error: mutable method dmd.mtype.TypeVector.isfloating is not
callable using a const object
Consider adding const or inout here
```
Which is but a small portion of the monster error that occurs
when you use `const` instead of `auto` for any AST `Type` or
`Dsymbol`.
More information about the Digitalmars-d
mailing list