Skip to content

Refactor typedarray - #740

Closed
MaxGraey wants to merge 1 commit into
AssemblyScript:masterfrom
MaxGraey:refactor-typedarray
Closed

Refactor typedarray#740
MaxGraey wants to merge 1 commit into
AssemblyScript:masterfrom
MaxGraey:refactor-typedarray

Conversation

@MaxGraey

@MaxGraey MaxGraey commented Aug 1, 2019

Copy link
Copy Markdown
Member

Move typedarray's macros to util folder for better reusage.

Relate AssemblyScript/node#20 (comment)

@MaxGraey
MaxGraey requested a review from dcodeIO August 1, 2019 15:37
@dcodeIO

dcodeIO commented Aug 1, 2019

Copy link
Copy Markdown
Member

Hmm, making these reusable seems to add more code (as of text) to stdlib for something that the related PR can solve with just a couple lines. Not sure if worth it, considering that these things become inlined anyway. Or will there be more Buffer methods that will benefit from it?

@MaxGraey

MaxGraey commented Aug 1, 2019

Copy link
Copy Markdown
Member Author

This provides more reusable code for Buffer in the future or any other similar class. I know NEAR use some custom byte buffer containers and The Graph so it could be useful for others

@jtenner

jtenner commented Aug 1, 2019

Copy link
Copy Markdown
Contributor

I like this. Might make the Buffer class smaller in the node project too.

I suggest documenting each one in the types file too. May I do that?

@dcodeIO

dcodeIO commented Aug 2, 2019

Copy link
Copy Markdown
Member

Ok, let's do it then :) (not sure about the types file as these are internals)

@jtenner

jtenner commented Aug 2, 2019

Copy link
Copy Markdown
Contributor

The only problem I see is that libraries could couple themselves to these internal functions. (as node will).

We shouldn't drop support for the functions if they are going to be exported and used in the std node library. As long as these functions are going to stick around, I'm okay with this pull request.

@jtenner

jtenner commented Aug 6, 2019

Copy link
Copy Markdown
Contributor

Is there a schedule for reviewing? I don't know if there's something wrong with my pull requests or I can move on and start working on other things.

@MaxGraey MaxGraey closed this Aug 28, 2019
@MaxGraey
MaxGraey deleted the refactor-typedarray branch August 28, 2019 20:20
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

Successfully merging this pull request may close these issues.

3 participants