4 ms·
Hi, author here. Most of your points are addressable by two observations: 1. Context and readibility are user dependent. 2. Choices were made for semantic pars
by goldfather8 10y ago
Hi, author here. Most of your points are addressable by two observations:
1. Context and readibility are user dependent.
2. Choices were made for semantic parsing first and correctness second.
The returns symbol was chosen as right arrow since I can set yield to left arrow.
I agree the def symbol can be jarring. But I have found it beneficial for nested functions and class methods - it takes up less space. I do note that some choices were 'aggressive', this being perhaps the most aggressive.
The times one writes set() vs None influenced the choice. The semantics are close enough.
The blackboards were again chosen for parsing semantics, not correctness. Unicode symbols stand out and take less space. I do agree on the dissonance and have since standardized use of blackboard/script/etc..
The mypy changes have benefited me immensely, it's so verbose otherwise.
Readability is to the eye of the beholder, where this approach excels since customization is dead-simple and the changes are entirely visual.
If one values an exact correspondence to mathematics, then just configure the symbols in that way. The post is indeed hyperbolic to illustrate the choices availible.
I do admit that being liberal with the notation makes cross-language configuration challenging. For other languages I only use the basic, correct symbols.
Thanks for the feedback.