megumin.org
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Ragdoll X@sh.itjust.works to Programmer Humor@programming.dev · 1 day ago

Python vs. Java

sh.itjust.works

video
message-square
38
link
fedilink
167
video

Python vs. Java

sh.itjust.works

Ragdoll X@sh.itjust.works to Programmer Humor@programming.dev · 1 day ago
message-square
38
link
fedilink
  • thenextguy@lemmy.world
    link
    fedilink
    arrow-up
    46
    ·
    1 day 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
      9
      ·
      21 hours 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
        4
        ·
        20 hours ago

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

        • silasmariner@programming.dev
          link
          fedilink
          arrow-up
          5
          ·
          18 hours ago

          Wait, how do you debug your code?

          • Traister101@lemmy.today
            link
            fedilink
            arrow-up
            3
            ·
            17 hours 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
              7
              ·
              12 hours ago

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

              • Traister101@lemmy.today
                link
                fedilink
                arrow-up
                1
                ·
                9 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
              ·
              17 hours 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
                ·
                17 hours 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
                  ·
                  2 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
      15
      arrow-down
      3
      ·
      1 day 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.

  • 757 users / day
  • 4.12K users / week
  • 8.55K users / month
  • 9.09K users / 6 months
  • 1 local subscriber
  • 29.1K subscribers
  • 362 Posts
  • 4.32K Comments
  • Modlog
  • mods:
  • adr1an@programming.dev
  • Feyter@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.14
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org