DEV Community

Discussion on: How do you approach knowledge gaps?

Collapse
 
samaldis profile image
UKJP

+1 for the rust resource on ownership as it is a unique concept not just in other ML based languages but across every language, although for me it makes a little bit more sense that pointers an references
in C based languges int **my_Number cause optimization??? felt like it should just be the default to rerfer to a pointer that refers to a pointer that referers to a place in memory the amount I used it - admittedly when C++14 was the newest standard and I was 15 and moved from Java and VB6 and was probably doing it all wrong.
Rust seems to have got it perfect, you just need to get to know life times and ownership and the rest is syntax and keywords.

while async -> await is one the best things to happen to javascript, no more having to call setTimeouts in the days before anonymous functions. - I really am showing my age - and realising you've just called the function in the setTimeout not passed it a reference to the object of the function. thanks ECMA for the 10 year gap between standards :') and while I now love Typescript it had promises which weren't much better than setTimeout or setIntereval.

I found over time I fell into work arounds that were possible at the time (i.e. relying on events, of which there were only about 8 at the time; load, click, scroll, hover, error.) which was not really something you want to get into the habit of - the workarounds - as they stick and lead to a lot off time wasted retraining your brain when the next standards are released, take it from a 28 y/o who started when he was 9 and we booted to MS-DOS from a floppy disk, ahh i really wanted the upgrade - a whole 10mb

in one "zip drive" to..
So +10000000 to anyone who is doing this and recognizing their weaknesses and fixing it BEFORE you end up picking up bad habits and have to spend weeks undoing years of small habits!

Collapse
 
maniflames profile image
Maniflames

Thanks 😄

Ownership, Borrowing & lifetimes are really powerful but definitely take time to get used to (espacially if you come from languages that don't have manual memory management). Don't know a lot about C so catch me if I'm wrong but I also feel like what makes Rust special is that it forces you to think about how memory should be managed in a specific way rather than leaving it all up to you.

I also really can't imagine writing asynchronous logic in JS without async/await or promises. I started programming in js right after ES6 released. By the time I wanted to do asynchronous stuff promises were really populair. ES6 is truly a blessing when you compare it to ES5 but I've also noticed that it can be a lot easier to think about how js works under the hood if you ignore some ES6 features while trying to get a deeper understanding of javascript.

Never used a floppy disk but hopefully people look weird at me in a few years for using USB-sticks as a kid :')