Follow

felt like treating myself with an easy win. same-scope variable shadowing baby

· Edited · · Elk · 2 · 0 · 1

easiest patch in the mfin world baby. just a matter of replacing the scope's HashMap with a Vec and iterating over it in reverse. sorry to the comune users who were deeply reliant on the O(1) same-scope variable lookup time by adding over 10,000 variables to every scope, but i think it's safe to say they're outliers adn should not have been counted

@estroBiologist can you explain what this does like I am a 5 year old with a learning disability? :blobcat_owo: 😇

@bazkie just some demo code that creates two variables with the same name in the same scope! it's a neat QoL feature that lets you "hide" the previous variable behind the new one. in languages like C++ you can't do this without creating a new scope, but Rust for instance does allow it, and it can come in real handy

Sign in to participate in the conversation
SHRIKE CLUB

ONLY CREATE ACCOUNT IF YOU PERSONALLY KNOW AN ADMINISTRATOR, AND IDENTIFY YOURSELF IN YOUR APPLICATION. YOU DO NOT NEED A SHRIKE CLUB ACCOUNT TO FOLLOW SHRIKE CLUB USERS. A PERSONAL FEDERATED SOCIAL MEDIA INSTANCE FOR SMALL CARNIVOROUS BIRDS BY SMALL CARNIVOROUS BIRDS