3 ms·
Do you have a link to your Ruby compiler? EDIT found it in your profile http://www.hokstad.com/compiler http://www.hokstad.com/compiler and submitted to HN. Gre
by pmontra 9y ago
Do you have a link to your Ruby compiler? EDIT found it in your profile http://www.hokstad.com/compiler http://www.hokstad.com/compiler and submitted to HN. Great series of posts.
About Python, it's a little older than Ruby (its design started in 1989) and Guido worked on the ABC language at the beginning of the 80s. IMHO that difference shows in many places, for example in having to explicitly pass self as argument in method definitions. Newer languages do without it and programmers don't get confused at all. All those double underscore methods and the general explicitness of the language smell of 80s and of C. Not necessarily a bad thing but reading some Python code is like getting on a time machine.
- vidarh 9y agoThanks. It's long overdue some updates as I've done quite a lot of work since (though still moving slowly) and it's pretty close to being able to fully compile itself now. What you say makes sense, and I understand that it takes a lot of effort to clean those type of things up without hurting backwards compatibility. This specific distinction though seems like one where it'd still be possible to get most of the benefit by changing the implementation of __dict__ to make it do something similar to __slot__ under the hood, but fall back to a dict for dynamic properties.