This doesn't cut it
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Ragdoll X@sh.itjust.works to Programmer Humor@programming.dev · 2 days ago

Python vs. Java

sh.itjust.works

video
message-square
50
fedilink
184
video

Python vs. Java

sh.itjust.works

Ragdoll X@sh.itjust.works to Programmer Humor@programming.dev · 2 days ago
message-square
50
fedilink
  • thenextguy@lemmy.world
    link
    fedilink
    arrow-up
    53
    ·
    edit-2
    2 days ago

    Actually… since around Java 21, it’s just

    void main() {
        println("Hello World");
    }
    

    https://blog.jetbrains.com/idea/2024/02/helloworld-and-main-meet-minimalistic/#class-‘helloworld-before-and-after-java-21

    • Solemarc@lemmy.world
      link
      fedilink
      arrow-up
      10
      ·
      1 day ago

      I vaguely remember hearing this this was only really available for toy code and that this function created the class ignored the arguments and qualified println when you compiled it, so it wasn’t actually that useful?

      • bigboismith@lemmy.world
        link
        fedilink
        arrow-up
        5
        ·
        1 day ago

        Printing to console is often only used for toy code anyway.

        • silasmariner@programming.dev
          link
          fedilink
          arrow-up
          6
          ·
          1 day ago

          Wait, how do you debug your code?

          • Traister101@lemmy.today
            link
            fedilink
            arrow-up
            4
            ·
            1 day ago

            A logger? Console prints are shitty in general but especially when you have an actual logger already

            • [object Object]@lemmy.world
              link
              fedilink
              arrow-up
              9
              ·
              1 day ago

              You know what println never did? Run arbitrary code on my toaster.

              • Traister101@lemmy.today
                link
                fedilink
                arrow-up
                1
                ·
                22 hours ago

                Neither did Log4j in basically all cases, some maniac just put arbitrary code callbacks into their logger, undocumented and enabled by default. The insane part isn’t the feature itself it’s the fact it’s enabled by default in a logger of all things.

            • silasmariner@programming.dev
              link
              fedilink
              arrow-up
              3
              ·
              1 day ago

              Oh man, I thought that was one of the classic jokes :'( I am out of touch

              • Traister101@lemmy.today
                link
                fedilink
                arrow-up
                2
                ·
                1 day ago

                People in my experience are actually very serious about the standard out to debug log which is… baffling. Same people generally outright refuse to learn how to use a debugger in languages where those are pleasant

                • silasmariner@programming.dev
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  edit-2
                  16 hours ago

                  Oh I’m completely serious. The joke is that everyone does it but everyone knows not to do it. I started doing it when I first ran into problems debugging actor contexts, and never stopped.

                  The good printlns become logs, obviously

    • AudaciousArmadillo@piefed.blahaj.zone
      link
      fedilink
      English
      arrow-up
      16
      arrow-down
      3
      ·
      2 days ago

      Beyond that, in reality you would write logger.info() in both 99% of the time.

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: !programmer_humor@programming.dev

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.

  • 518 users / day
  • 4.07K users / week
  • 8.42K users / month
  • 18K users / 6 months
  • 1 local subscriber
  • 29.1K subscribers
  • 1.59K Posts
  • 43.8K Comments
  • Modlog
  • mods:
  • adr1an@programming.dev
  • Feyter@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.8
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org