Dmitri Goosens :elephpant: on Nostr: OK... here is a question (#PHP but other #dev communities are welcome to comment. ...
OK... here is a question (#PHP but other #dev communities are welcome to comment.
When building a decoupled app, do you consider the usage of something like
`ClassWithAnnoyingName::class`
(not to call the class, but to reference the name as a string and to simply avoid to type it out) as coupling?
IMHO, it is not
- it is very trivial to replace with its string value if needed
- it greatly improves DX
- it greatly reduces errors because of typos
But what do you think ? And why ?
When building a decoupled app, do you consider the usage of something like
`ClassWithAnnoyingName::class`
(not to call the class, but to reference the name as a string and to simply avoid to type it out) as coupling?
IMHO, it is not
- it is very trivial to replace with its string value if needed
- it greatly improves DX
- it greatly reduces errors because of typos
But what do you think ? And why ?