I've been playing with new languages lately, some more and others, but there is one question I always have, regardless of the language.

"Ok, now I'm writing code in this particular place. What can and can't I do in this context?"

I guess those questions are answered with time.

It's one of those reveals later.

"Wait, I could do that there?"
or something like
"I actually had access to Z in this context?"
or
"I didn't have to do this because this other thing is already here."

Autocomplete sometimes helps but not often.

Here are two very different examples.

1) When learning PHP, you might not know that all of the standard functions are just there, no include needed.

So without thinking about it, at any point in time, you can just call ftp_connect() and connect to a ftp server.

2) When using Rust and WASM, you have access to the canvas. But to draw an image onto the canvas, there is only a "draw_image_with_canvas" function, but you need to then learn that images are also canvases, which isn't initially obvious (might be if you're used to textures).

Side note, I just want you to enjoy this actual function name in an actual library.

That is all.

@olafurw What about "sx" and "sy" ... are they chopped liver?!

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.