Upvote!
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
lawrence@lemmy.world to Programmer Humor@lemmy.ml ·
edit-2
2 years ago

Ok, at some point we made a big mistake.

lemmy.world

message-square
40
fedilink
305

Ok, at some point we made a big mistake.

lemmy.world

lawrence@lemmy.world to Programmer Humor@lemmy.ml ·
edit-2
2 years ago
message-square
40
fedilink

Hacker News post about this: https://news.ycombinator.com/item?id=39309783 (source available)

  • tyler@programming.dev
    link
    fedilink
    arrow-up
    16
    arrow-down
    2
    ·
    2 years ago

    Take a look at some typescript libraries and frameworks and you will see stuff like this. Completely unreadable mess.

    • ris@feddit.de
      link
      fedilink
      arrow-up
      19
      ·
      2 years ago

      I have seen image recognition or text RPGs with type script types, but const ok:true = true as Grid< 4, 9, 2 Wtf

      • MinekPo1@lemmy.ml
        link
        fedilink
        English
        arrow-up
        4
        arrow-down
        1
        ·
        2 years ago

        note that it continues onto the next line

    • Meltrax@lemmy.world
      link
      fedilink
      arrow-up
      6
      ·
      2 years ago

      Styled Components’ type system is one of the most impressive and most fucked up things I’ve ever had to dive into.

    • Big P@feddit.uk
      link
      fedilink
      English
      arrow-up
      5
      ·
      2 years ago

      For example?

      • sloppy_diffuser@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        4
        ·
        2 years ago

        Not OP, and these examples are not unreadable, but they are a few steps up from your typical generics.

        https://effect-ts.github.io/effect/effect/Unify.ts.html#unify

        https://effect-ts.github.io/effect/effect/Pipeable.ts.html

        • marcos@lemmy.world
          link
          fedilink
          arrow-up
          8
          ·
          2 years ago

          Creating basic functionality for the language always leads to unreadable code.

          The C++ version would be much, much worse, and the Lisp version is Lisp.

          • sloppy_diffuser@sh.itjust.works
            link
            fedilink
            English
            arrow-up
            3
            ·
            2 years ago

            Agree. What I linked provides core type support for that library. The pipe one is just a bunch of overloads to support a specific way of handling function composition to appease the TypeScript type checker.

            There are a lot of typing hacks in that library to simulate higher kinded types.

        • thesporkeffect@lemmy.world
          link
          fedilink
          arrow-up
          4
          ·
          2 years ago

          Right to jail. Right now.

Programmer Humor@lemmy.ml

programmerhumor@lemmy.ml

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: !programmerhumor@lemmy.ml

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
Visibility: Public
globe

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

  • 215 users / day
  • 886 users / week
  • 1.96K users / month
  • 8.56K users / 6 months
  • 1 local subscriber
  • 38.3K subscribers
  • 1.86K Posts
  • 39.5K Comments
  • Modlog
  • mods:
  • AgreeableLandscape@lemmy.ml
  • cat_programmer@lemmy.ml
  • BE: 0.19.6
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org