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

A lot of important, yet "stringly" types #6

Open
deepfire opened this issue Feb 7, 2017 · 4 comments
Open

A lot of important, yet "stringly" types #6

deepfire opened this issue Feb 7, 2017 · 4 comments

Comments

@deepfire
Copy link
Contributor

deepfire commented Feb 7, 2017

The abundance of String-typed objects passed around makes it more difficult to navigate the project.

@deepfire
Copy link
Contributor Author

deepfire commented Feb 7, 2017

Current list of candidates for creative newtype-ing:

  • uniform names (as in keys of PipelineSchema.uniforms)
  • object array names (as in keys of PipelineSchema.objectArrays)
  • slot names (as in slotName arg of Input.addObject, also in GLStorage.slotMap)
  • attribute names (as in keys of the attribs arg of Input.addObject)

@deepfire
Copy link
Contributor Author

deepfire commented Feb 7, 2017

@csabahruska, would you like to outsource this somewhat massive refactoring, or would it be less trouble for you to do it yourself?

Seeing how this touches three projects at once:

  • lambdacube-ir, because of PipelineSchema
  • lambdacube-gl, because of above and GLStorage and attribute-related types
  • lambdacube-quake3, because of all of the above and still more that I didn't mention here

..I can imagine that it can be quite daunting..

@csabahruska
Copy link
Member

Thanks for the feedback. I agree it's a good idea to use newtypes for these names. I can do the refactoring in 3-4 days.

@csabahruska
Copy link
Member

This will take more time, because I have to add newtype support for the Data Definition Language EDSL, that is used to generate lambdacube-ir for multiple languages (hs, purs, c++, java, etc.)

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

No branches or pull requests

2 participants