When does talking about sound like Philosophy 101?

Teaching `None` in (or similar in other languages) is one of them

`stuff = None`

I can be heard saying the following when teaching (not quite, but dramatising a bit for effect!)

"`stuff` is not empty. But we want it to be empty. But we need to put something in. So we put Python's way of representing nothing. But `None` is still an object. So it's still something. But it's something that represents nothingness. Is that all clear?!"

It's a bit like when you're told to listen to silence in a meditation exercise?!

@s_gruppetta It's the concept of l-value/r-value difference that may be strange to uninitiated. #Python None is just one example of it and straightforward one at that.

Also, If void* falls in the forrest, does it make a sound?

@s_gruppetta If the concept of None is hard to explain perhaps its not a great idea? These days I have a hard time understanding why allowing a variable to change type is ever a good language design. IMO the only time a string should ever be anything other than a string is during a kernel panic :)

(I realize this comment is neither here nor there, just thinking a loud)

@SignalsAndSorcery The static v. dynamic typing debate is one that will go on forever. There's a place for both, I feel, depending on the use case…

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.