3 ms·
Yes I'm aware. You can define methods/functions on most (if not all implementations of struct); Ruby's is no exception to this. The parent indicated they didn'
by bigtunacan 4y ago
Yes I'm aware. You can define methods/functions on most (if not all implementations of struct); Ruby's is no exception to this.
The parent indicated they didn't understand why both struct/class exist because there is so much overlap. The primary reason is to signal intent. This has largely been lost as the masses just use classes for everything or they use simple data types like hashes.