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 ?
Published at
2024-04-10 14:02:11Event JSON
{
"id": "cdbb45c64c735142fa63e4de2bc4d1f5125e74433d8860666a8d42c5b48d3d25",
"pubkey": "1021c34f5340dbb740c0814437248fd3859b28145884ed2eeca94f93af3f88f7",
"created_at": 1712757731,
"kind": 1,
"tags": [
[
"t",
"dev"
],
[
"t",
"php"
],
[
"proxy",
"https://phpc.social/users/dgoosens/statuses/112247290658696299",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://phpc.social/users/dgoosens/statuses/112247290658696299",
"pink.momostr"
]
],
"content": "OK... here is a question (#PHP but other #dev communities are welcome to comment.\n\nWhen building a decoupled app, do you consider the usage of something like \n`ClassWithAnnoyingName::class`\n(not to call the class, but to reference the name as a string and to simply avoid to type it out) as coupling?\n\nIMHO, it is not\n- it is very trivial to replace with its string value if needed\n- it greatly improves DX \n- it greatly reduces errors because of typos\n\nBut what do you think ? And why ?",
"sig": "9b605cccf0687d706d98b955208748276d8ef279c15e4802500964e5604460098989aaa848b75e6cbe252b9aeca8448553336e5423bd35fc072d04e3633fff10"
}