will talk for :elephpant:! on Nostr: as ::class can be used without the class actually being available, it is not really ...
as ::class can be used without the class actually being available, it is not really coupling. (see
https://3v4l.org/jorQT)
Sometimes code needs to check whether a class is available or not and this is a valid way to do so even when the class is not available. Therefore it is not more coupleded that writing out the full namespaced classname as a string.
Published at
2024-04-10 14:19:14Event JSON
{
"id": "294e659f5e400eb79c974a900c0c35ef695e253bf881adb4ddfcae9aab0cfbc8",
"pubkey": "4cff951391129629dce57dcea94261309fbc07049fdecfe5dba0819fdf075681",
"created_at": 1712758754,
"kind": 1,
"tags": [
[
"e",
"cdbb45c64c735142fa63e4de2bc4d1f5125e74433d8860666a8d42c5b48d3d25",
"",
"root"
],
[
"p",
"1021c34f5340dbb740c0814437248fd3859b28145884ed2eeca94f93af3f88f7"
],
[
"proxy",
"https://phpc.social/users/heiglandreas/statuses/112247357726330387",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://phpc.social/users/heiglandreas/statuses/112247357726330387",
"pink.momostr"
]
],
"content": "as ::class can be used without the class actually being available, it is not really coupling. (see https://3v4l.org/jorQT)\n\nSometimes code needs to check whether a class is available or not and this is a valid way to do so even when the class is not available. Therefore it is not more coupleded that writing out the full namespaced classname as a string.",
"sig": "8bfcf8ff575acd26eec8e359ac561d80ce647310698385c851240256c780bc4e0b27b0175da36a055d9fd06a211d8b8ce46ed4fa27fe97d3c36bc4b129026685"
}