longing for a day where the typecast can be part of the foreach() instead of this magic comment stuff that i absolutely loath doing. or hard typed collections.
for context, in Skyrim scripting, if it doesnt fit the cast you get NULL that iteration. and im 100% ok with that. (but an exception is cooler)
@bobmagicii I mean, what if a collection has 5 items, and only the last fails? If not using static analysis to catch that issue before running the code, what happens in the interpreter when it runs the code?
@ramsey then on the last loop an exception is thrown. just like anything else in php thats more or less just in time? i can already throw a null in that final slot and now that $Util->Print($V->Title) is going to bomb on reading Title on NULL.
instead the foreach could stop you before that iteration starts and be like "expected a type fool" instead of that worse error.
@ziadoz good call. based on how i named it, i can tell they hijacked me in the middle of being already pissed off just trying to learn how to use mac os.
in school i never skipped any classes but i constantly have dreams about skipping too many and being a credit short to graduate. its usually p.e. class im skipping cuz i hated that. plus high school was over a score ago, come on.
@bobmagicii I've had similar many times. School is long gone and I never skipped or ran super late, but I've had many dreams over the years of missing class or running super late for class or assignments.
@oliver lulz im sorry thats a big oof 😅 at my first job we didn't have an int sized problem, but an indexing issue which used to require me to drain a lot of tables to an archive database so the live one could always be fast. i think thats the worst i've had to do.
@bobmagicii well yeah, that's dangerously similar 🤷🏼♂️
Our live table hit the unsigned int max. But, now we have 2 archives 😄 ...because the original one was so big that it'd take a couple of days or weeks (nobody knows for sure) to upgrade.