google / xls

XLS: Accelerated HW Synthesis
http://google.github.io/xls/
Apache License 2.0
1.18k stars 172 forks source link

[DSLX] Support methods on structs #617

Open cdleary opened 2 years ago

cdleary commented 2 years ago

As reflected in #526 an outstanding request has been to support methods on struct instances so folks can use the familiar "object oriented receiver" style function invocations -- without polymorphism the additional utility is limited but familiarity/convenience / some conciseness will certainly be increased, and it helps pave the path towards monomorphization, right now the DSL only supports parametric instantiation via constexpr values.

taktoa commented 1 year ago

+1, this would be really nice. I was feeling this pain recently.