HuoLanguage / huo

interpreted language written in C
MIT License
212 stars 21 forks source link

Operations on arrays #44

Closed TheLoneWolfling closed 8 years ago

TheLoneWolfling commented 8 years ago

Currently only add is supported on arrays.

Would it make sense to have all built-ins that aren't otherwise supported automatically map themselves over an array?

It seems kind of odd that you can element-wise add two arrays, but not subtract them (for instance).

incrediblesound commented 8 years ago

Yeah that was part of the plan. I started matrix multiplication but that was tricky and then I got sidetracked. If you'd like to add any of those feel free, otherwise I'll add them eventually.

TheLoneWolfling commented 8 years ago

Ok. I shall do that then.

TheLoneWolfling commented 8 years ago

Do you want a dedicated matrix multiplication keyword? If so, what?

incrediblesound commented 8 years ago

Yeah I think ultimately we should have a special keyword for matrix multiply although I'm not sure exactly what it should be. We might even be able to just add it to the core library instead of implementing it natively.