You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Great that this code is open source, but internally it's actually quite confusing.
I'm trying to recreate the PHP generator since it's currently a catastrophic mess. One pecularity with PHP is that most of it is actually case insensitive. Saying, for example, the compile-time constant __METHOD__, it is not allowed to create symbols (e.g. classes) with that name, but also any case variation of it e.g. __mEtHod__ is also not allowed. So the "forbiddens" stuff will not work out of the box.
TL:DR; I've been trying to figure out how the naming (Name object) works. Looking at the object, we get this public interface:
excluding the redundant entries added by the IDE, I don't understand any of the remining symbols:
addAssociate() - wth is an associate? This method could as well be named addThing().
firstProposedNamed() - sounds promising...but.. why an object representing a name needs a whole bunch of "names" to get/generate a name string?
isFixed() - no idea what's a fixed name (as opposed to other names).
nameAssignments() - also not sure what that does..
namingFunction - makes sense, although not sure it should be provided.
proposeUnstyledNames() - no idea.
order - Can't think of a reason behind that, but ok.
I understand that this code is trying to cater for multiple systems and that some things are like that to handle specific cases, but unfortunately I still can't imagine the reason behind this code.
PS: Yes, I checked class headers and most of them do not provide any documentation.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Great that this code is open source, but internally it's actually quite confusing.
I'm trying to recreate the PHP generator since it's currently a catastrophic mess. One pecularity with PHP is that most of it is actually case insensitive. Saying, for example, the compile-time constant
__METHOD__
, it is not allowed to create symbols (e.g. classes) with that name, but also any case variation of it e.g.__mEtHod__
is also not allowed. So the "forbiddens" stuff will not work out of the box.TL:DR; I've been trying to figure out how the naming (Name object) works. Looking at the object, we get this public interface:

excluding the redundant entries added by the IDE, I don't understand any of the remining symbols:
addAssociate()
- wth is an associate? This method could as well be namedaddThing()
.firstProposedNamed()
- sounds promising...but.. why an object representing a name needs a whole bunch of "names" to get/generate a name string?isFixed()
- no idea what's a fixed name (as opposed to other names).nameAssignments()
- also not sure what that does..namingFunction
- makes sense, although not sure it should be provided.proposeUnstyledNames()
- no idea.order
- Can't think of a reason behind that, but ok.I understand that this code is trying to cater for multiple systems and that some things are like that to handle specific cases, but unfortunately I still can't imagine the reason behind this code.
PS: Yes, I checked class headers and most of them do not provide any documentation.
Beta Was this translation helpful? Give feedback.
All reactions