Hacker News new | ask | show | jobs
by taliesinb 4364 days ago
You can make your own opaque data objects, quite easily, thanks to HoldAll, UpValues, and Internal`SetNoEntry (the nuclear option).

What precisely becomes unmaintainable about Mathematica/Wolfram Language code after 10 lines? You could just be bad at programming in WL.

1 comments

Name[Field1, Field2, ...] is not an opaque data type. Maybe you can give me an idiomatic example of how to build a binary tree, for example? Or maybe something more complicated like a doubly linked list?

I do not write Mathematica code, but most code I've seen usually ends up being this mess of functions. I'll give you that maybe the code I've seen has just been bad, so we can ignore my point there.