Skip to content

Conversation

@dcousens
Copy link
Contributor

Still not sure about this, so I figured I'd put it on its own.
decompileToChunks seems very context specific.

I feel like these names could be resolved by just basic documentation?

@dcousens dcousens added this to the 2.0.0 milestone Aug 19, 2015
@dcousens dcousens changed the title scripts: rename compile to compileToBuffer scripts: rename compile to compileToBuffer (bikeshed) Aug 19, 2015
@dcousens dcousens mentioned this pull request Aug 19, 2015
@weilu
Copy link
Contributor

weilu commented Aug 19, 2015

I still prefer more specific names. We don't have documentation, yet.

@dcousens
Copy link
Contributor Author

dcousens commented Sep 8, 2015

I think we'll resolve this with documentation in 2.0.0 (#272).
The proposed names are effective at inferring the types to users, however they seem out of place when you are using the ambidextrous nature of the functions internally.
They also become cumbersome:

scripts.decompileToChunks(scripts.compileToBuffer(chunks))

vs

scripts.decompile(scripts.compile(chunks))

It is also hard to decide whether the name should always include the source type, such as: scripts.decompileBufferToChunks.
I'm not sure if we would want to do that verbosity of function name across all our free functions... (verb(typeA -> typeB) seems verbose).

@dcousens dcousens closed this Sep 9, 2015
@dcousens dcousens deleted the compile branch September 9, 2015 02:19
@dcousens
Copy link
Contributor Author

dcousens commented Sep 9, 2015

Open to discussion, but, again, lets see a convention first, then go with it.
It should probably be consistent with/without an object OOP context.

@dcousens dcousens modified the milestones: 3.0.0, 2.0.0 Sep 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants