3 ms·
> one that lacks the elegance and consistency but which has a larger ecosystem. ... and decent first party docs, actual code modules rather than “execute every
by dragonwriter 4y ago
> one that lacks the elegance and consistency but which has a larger ecosystem.
... and decent first party docs, actual code modules rather than “execute every source file in the global namespace”, a first party Windows build, etc., etc., etc.
If the Ruby community can't acknowledge the real things holding it back compared to other available options, well, that makes it that much harder to catch up.
- mypalmike 4y agoThey did apparently manage to make their interpreter figure out where mismatched "end" statements are most likely to be, which was one several serious pain points for me with the language. I don't think the execution model you mention, which results in the absurdity of C style transitive includes polluting the global namespace, will ever be changed though.
- tomstuart 4y ago> I don't think the execution model you mention, which results in the absurdity of C style transitive includes polluting the global namespace, will ever be changed though. There is a proposal at https://bugs.ruby-lang.org/issues/19024 https://bugs.ruby-lang.org/issues/19024 to change this but, as you can see from the comments, it’s a bit tricky to get right while preserving backwards compatibility. (Whether that conversation makes you more or less optimistic about the chances of it ever being changed is up to you.)
- michaelteter 4y ago> They did apparently manage to make their interpreter figure out where mismatched "end" statements are most likely to be, which was one several serious pain points for me with the language. Searching for a mismatched/missing _end_ is preferable to having a line or block get accidentally unindented and end up still "working" (running) while producing very confusing results. Moving blocks of code in Python requires great care, especially since the editor cannot reasonably guess which scope level the paste should go into. Also, the lack of an _end_ or bracket as with other languages means the editor cannot visually assist with identifying block boundaries. To be fair though, my vim-memory of using % to bounce between start/end brackets doesn't work in Ruby because of the begin/end words instead of matched symbols :(. However, RubyMine does show the beginning of the block as an unobtrusive popup at the top of the window when your cursor is on the _end_ keyword. That's super handy when there are several blocks closing in succession.
- p_l 4y agoI had over million euro of machinery stop because a rarely reached branch had one line with one less space due to missing linter run. Apparently Python 3 still doesn't fully parse and validate code on load, or somehow it made a valid if nonsense AST out of that.
- andai 4y agoI know it's offtopic, but this is really a case of using spaces where tabs are the correct choice ;)
- michaelteter 4y agoPerhaps, but should _that_ choice (or more likely, misconfiguration of a system) be so dangerous?
- p_l 4y agoUnfortunately, Python (and YAML, though it wasn't YAML this time) specifies spaces as the syntactically critical element.
- mypalmike 4y agoSure, Python has a variation of the same problem.
- dragonwriter 4y ago> Moving blocks of code in Python requires great care, especially since the editor cannot reasonably guess which scope level the paste should go into. Even when I was new to python, the only problem I ever really had with this is when I mess up and copy the first line starting at the the first nonwhitespace character so the relative indentation is wrong. When do you ever move a block and not know what scope you want it in? At most, with really long blocks, you fold the more deeply nested blocks before pasting. > Also, the lack of an _end_ or bracket as with other languages means the editor cannot visually assist with identifying block boundaries. No, it doesn’t. In practice, editors usually don’t, but they recognize the beginning and ending of blocks, and use it for folding, which means they could insert phantom labels (as editors often use for blame information, inferred type signatures, etc.) to provide informatiom about the block ending (and even align them to indicate the indentation level corresponding to each ending block.) An existing line of text is not necessary for editors to provide feedback.
- michaelcampbell 4y ago> serious pain points This suprises me. I've missed `end`s before as much as anyone, but I guess as an OCD reformatter (prettier, IntelliJ, rubocop, etc.), they show up VERY OBVIOUSLY and right quick. They've never even been an itch, much less "pain".