OniLink

The Other Girl with the Gall

I'm Violet/OniLink. Trans and autistic and just kinda doing my best.

Views do not reflect my employer.

I do informative Let's Plays on YouTube.

You can find me on FFXIV on Leviathan as Satora Lahnsi.

I run @WoLQotD here on Cohost!

I also have an IC blog at @satora-lhansi!

<3 @Gleam-Oria @catgirl-real @ann-arcana

Script Kitty :3 θΔ

avatar and header image from In Stars and Time by @insertdisc5


You must log in to comment.

in reply to @OniLink's post:

It borrows a LOT from the ML family; the compiler was originally written in Ocaml, which sorta do have some syntactic similarities. I spent some time learning F# ages back and was struck immediately by how much it felt like "What if Python had good types and also didn't hate FP".

The python influence is very real! Early on Rust had a ruby-style form of iterators, but this was found to be painful. This was mostly because some people from the Ruby community got involved. However, a few surveys at the time showed C++ programmers primarily using python (about 68% on average), and as more and more C++ people got involved, the python approach to iterators was actually adopted. 🙂

it's funny, i usually think of rust iterators as their own thing because the Iterator trait is so powerful, but now that you mention it yeah the core next() function feels very python-y!

also, i knew i smelled ruby influence in there somewhere...

Yup, the only difference between Python's approach is that in python exceptions are actually a fast path for control flow (it's a long story, but the VM is build around it!), so instead of returning None, you raise StopIteration, but let's be honest: what is the actual real difference between an empty exception type that doesn't inherit from the exception hierarchy used to imply that the iteration must stop because there are no more values and a value that means "there are no more values"? Nothing 😁