Lemmy.World
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
cm0002 to Programmer Humor@programming.dev · 6 months ago

The meaning of this

message-square
10
link
fedilink
  • cross-posted to:
  • [email protected]
306

The meaning of this

cm0002 to Programmer Humor@programming.dev · 6 months ago
message-square
10
link
fedilink
  • cross-posted to:
  • [email protected]
alert-triangle
You must log in or # to comment.
  • TootSweet
    link
    fedilink
    English
    arrow-up
    27
    ·
    6 months ago

    Go:

    MCU universe Loki saying "I've never met this man in my life."

    • Kairos@lemmy.today
      link
      fedilink
      arrow-up
      1
      ·
      6 months ago

      deleted by creator

  • sourhill@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    13
    ·
    6 months ago
    const that = this;
    
  • nnullzz
    link
    fedilink
    arrow-up
    11
    ·
    6 months ago

    Yeah, this is that.

  • fnrir@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    8
    ·
    6 months ago

    Rust: do you mean Self or self?

    • d_k_bo@feddit.org
      link
      fedilink
      arrow-up
      7
      ·
      edit-2
      6 months ago

      this is commonly used with a similar meaning to self in cases where self can’t be used because it is a reserved keyword.

      Example:

          fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<St1::Item>> {
              let this = self.project();
              this.inner.poll_next(cx)
          }
      

      https://github.com/rust-lang/futures-rs/blob/master/futures-util/src/stream/select.rs#L113-L116

  • verstra@programming.dev
    link
    fedilink
    arrow-up
    6
    ·
    6 months ago

    Any language feature with such a long definition is a bad language feature.

    The less such features, the better the language.

    Thus, javascript is not a “good” language for expressing your programs.

  • Justas🇱🇹@sh.itjust.works
    link
    fedilink
    arrow-up
    5
    ·
    6 months ago

    let self = this;

  • Strawberry@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    2
    ·
    6 months ago

    I did not know that about event handlers, that is actually super convenient

  • AnotherPenguin@programming.dev
    link
    fedilink
    English
    arrow-up
    1
    ·
    6 months ago

    In python self is just a convention, you can call it whatever you want :)

    • aubeynarf@lemmynsfw.com
      link
      fedilink
      arrow-up
      1
      ·
      5 months ago

      and don’t ever pull the mask off by reading the descriptor and meta object protocol.

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 3.05K users / day
  • 4.78K users / week
  • 9.04K users / month
  • 18.7K users / 6 months
  • 8.2K local subscribers
  • 27.6K subscribers
  • 1.95K Posts
  • 73K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • UI: 0.19.12-3-gc6677485
  • BE: 0.19.12-4-gd8445881a
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org