On Tuesday, November 21, 2017 at 10:47:02 AM UTC, Robin Heggelund Hansen 
wrote:
>
> Something like 
> https://github.com/Skinney/core/blob/master/src/Elm/JsArray.elm ? It's 
> what is used as the basis for Arrays in 0.19. It is not planned to be 
> opened for use outside of elm-lang/core, but if it fits your usecase 
> better, I'm sure Evan would be interested in hearing about it.
>
> (JsArray is a thin wrapper over javascript arrays. Any operation that 
> modifies the underlying structure causes a complete copy, but get and folds 
> are very fast. Slicing when start === 0 is still going to be faster using 
> Elm Arrays as it is a tree structure. On the other hand, it should be 
> fairly easy to create a "view" instead of slicing, but that might give you 
> problems with space leaks.)
>

Yes.

Something I forgot to mention about Java nio.Buffers is that they are byte 
array buffers. There is mechanism by which int and float (and short, char, 
lond and double) are overlayed as views onto byte buffers.

The reason I mention this is that as yet Elm does not have any support for 
binary buffers, and it might also be worth thinking about that issue at the 
same time.

Could JsArray.elm by made to work with JavaScript typed 
arrays? https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to