JacquesCarette / Drasil

Generate all the things (focusing on research software)
https://jacquescarette.github.io/Drasil
BSD 2-Clause "Simplified" License
136 stars 25 forks source link

Fixed type signatures in `InternalListFunc` typeclass #3808

Closed B-rando1 closed 1 week ago

B-rando1 commented 2 weeks ago

I noticed that the listSizeFunc and listAppendFunc methods of the InternalListFunc typeclass don't take the list as their parameter. This is likely because in the OO renderers, these functions are used for everything after the dot (e.g. l.size()). For the Python renderer this already requires a bit of a hack for listSizeFunc, as len is a function rather than a method in Python. As we are adding procedural languages this will come up much more often, so I would like to avoid that hack.

These changes will make things much simpler and cleaner as we implement lists in procedural renderers. This will also help with #3746.