You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with int probably being the most useful (and common) one. However, I'm not sure how to go about code generation. The usual stringly-typed approach looks too error-prone.
The text was updated successfully, but these errors were encountered:
Float also looks important, for those users with stringent memory requirements.
Seeing as Kotlin is a strictly-typed language, we would have to eschew NumPy's approach (store the actual element type as a string property) and instead provide a separate class (hierarchy) for each element type (F32Array for floats, I32Array for ints etc.) We certainly can't use generics, because that would just box everything all the time.
The code generation, however, does present a problem. I'm tempted to invent a C++ template / Kotlin crossover which would automatically generate Kotlin code based on a template. Without this, our code is bound to get really WET or even WETTER (Write Everything Three Times and Enjoy Refactoring).
There're quite a few data types we could support:
with int probably being the most useful (and common) one. However, I'm not sure how to go about code generation. The usual stringly-typed approach looks too error-prone.
The text was updated successfully, but these errors were encountered: