Skip to content

Struct datatypes for JavaScript with a few sweet.js macros

Notifications You must be signed in to change notification settings

jlongster/struct.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

struct.js

Wouldn't it be nice to create simple memory-efficient data structures like in C? And know that referencing them are simple reads/writes from a pointer + offset?

What if you could even optionally stack-allocate them, and never touch the garbage collector?

This is all possible today in JavaScript with a few sweet.js macros.

This is still being researched so I'm not going to go into details just yet.

defineRecord Point {
    x : double,
    y : double
}

Point foo;

foo.x;
foo.y;

About

Struct datatypes for JavaScript with a few sweet.js macros

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages