Some middle-aged guy on the Internet. Seen a lot of it, occasionally regurgitating it, trying to be amusing and informative.

Lurked Digg until v4. Commented on Reddit (same username) until it went full Musk.

Was on kbin.social (dying/dead) and kbin.run (mysteriously vanished). Now here on fedia.io.

Really hoping he hasn’t brought the jinx with him.

Other Adjectives: Neurodivergent; Nerd; Broken; British; Ally; Leftish

  • 0 Posts
  • 3 Comments
Joined 1 month ago
cake
Cake day: August 13th, 2024

help-circle
  • 95% of all “Introduction to <whatever programming language>” books tend to dedicate the first couple of chapters to the fundamentals but with a specific bias towards the language in question. Seek out a few of those at a library or online equivalent and you’ll start to see patterns cropping up.

    Anything that doesn’t have that bias is likely to use pseudocode which looks like a programming language anyway.

    Object orientation works around the concept that things in the program “know” things about themselves and how to do things for themselves rather than have some other part of the program do things to them. Commonly you’ll see things like doSomethingWith(someObject) being the non-OO way and someObject.doSomething being the OO way. That is, in the latter someObject contains the knowledge of how to doSomething, and the dot notation urges it to do whatever it is.

    For a silly but more concrete example, x ← 2 + 2 is non-OO, but x ← 2.add(2) is at least partially OO because the first 2 is expected to know how to add another 2 to itself and give out the correct answer. Presumably in whatever language that is, someone has created a method for numbers to know what to do when told to add. The other 2 doesn’t really get a say in things. We might also have, say, elephant.putOn(hat), but it might not be possible to hat.putOn(elephant) because no-one thought to teach the hat how to wear things, let alone elephants.


  • That’s a thorny question: Do comments need to be in the base standard, or can that be offloaded to those building on it? It doesn’t look like it would be hard to have (comment "foo bar baz") in an expression and have a re-parser throw that out.

    Is the complaint that no two groups of people will use the same comment standard if left to their own devices? It’s not like the other data from different sources will always match up. What’s one extra, and fairly easy to handle SNAFU?

    That said, yes, I think I’d be more comfortable knowing there was an accepted comment format. The aesthetic seems to be Lisp-like, and I notice that the Lisp comment marker, the semicolon, is currently a reserved character, that is, it’s illegal to use it unquoted. Maybe they’re thinking of adding that at some point.