do I incur a penality on compile time if I explicitly declare default behavior ?
someone
someone at somewhere.com
Mon Jun 21 04:12:55 UTC 2021
I mean, coding as following:
```d
int intWhatever = 0; /// default being zero anyway
foreach (classComputer objComputer, objComputers) { ... } ///
explicitly declaring the type instead of letting the compiler to
figure it out
struc Whatever {
public doSomething() { ... } /// explicitly declaring scopes
matching the default ones
}
string[] strWhatever;
if (strWhatever.length > cast(size_t) 1) { ... } /// explicitly
casting for proper types although not required to at all
```
... and the likes; or, besides unnecessary typing, are there any
cons that I should be aware of while using DMD ?
More information about the Digitalmars-d-learn
mailing list