Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a gensym to store doc metadata #12062

Merged
merged 2 commits into from
Jul 9, 2015
Merged

Use a gensym to store doc metadata #12062

merged 2 commits into from
Jul 9, 2015

Conversation

MikeInnes
Copy link
Member

Proposed fix for #11974. Would a constant symbol like __META__ buy us anything over this approach?

@tkelman tkelman added the docsystem The documentation building system label Jul 8, 2015
@ScottPJones
Copy link
Contributor

Could you use __META__ instead of META'? (but otherwise keep it like you have)
Calling something blah prime is something that mathematicians would get, but not general programmers, and the use of a single quote in an identifier is sure to leave some people scratching their heads.

@MikeInnes
Copy link
Member Author

Possibly, but this is very much an implementation detail that people in general aren't going to look at.

The actual meta dict in your module is going to be called something like ##META#2538, which is even more likely to make the general programmer scratch their head if they come across it (as with many other implementation details). But we're not really optimising for user surprise here because it's not user-level.

@MikeInnes
Copy link
Member Author

(In fact, we sort of are optimising for user surprise here – it's as surprising as is reasonably possible exactly so that people don't come across it by accident).

@MichaelHatherly
Copy link
Member

(Whoops, totally forgot to go and implement this after opening #11974... sorry about that.)

Re: using a gensym rather than just an underscored name change, +1.

@ScottPJones
Copy link
Contributor

Possibly, but this is very much an implementation detail that people in general aren't going to look at.

Well, I saw it, and scratched my head! Is the META' name not saved anywhere then?
I still think not using single quotes in identifiers is a good thing.

MikeInnes added a commit that referenced this pull request Jul 9, 2015
Use a gensym to store doc metadata
@MikeInnes MikeInnes merged commit 477e861 into master Jul 9, 2015
@StefanKarpinski
Copy link
Member

How about we just call the constant in every module __META__ instead of doing the gensym thing. I'd prefer to know what the name is and have it be a reserved name (i.e. of the form __xxx__).

@MikeInnes
Copy link
Member Author

Sure, I'm completely OK with that too.

@MikeInnes MikeInnes deleted the omm/meta-gensym branch July 9, 2015 18:50
@ScottPJones
Copy link
Contributor

I hope you do keep the meta function, that is precisely what's being talked about elsewhere, as being more Julian than accessing a field.

MikeInnes added a commit that referenced this pull request Jul 9, 2015
@MikeInnes
Copy link
Member Author

Done in 4fc9bb6

@MichaelHatherly
Copy link
Member

What should the official interface for getting at the metadata be then? Docs.meta(MyMod) or MyMod.__META__?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docsystem The documentation building system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants