This post brought to you by my shiny new drawing tablet! I decided to gift myself a tablet for my birthday. I like making doodles of things - I remember information better that way - and I’m also always envying @b0rk’s drawings. So, this is me, giving it a test run.
When I first started learning Scala, the underscores everywhere were one of the things I found most confusing. Why were there underscores everywhere??? I was coming from a background of JavaScript/Python/Java/Golang/Ruby, so I had enough polyglot experience that most of Scala syntax made sense at a glance. But those underscores. Man.
Of course when I tried Googling my problem I ended up on the relevant-sounding page “How do I find out what some symbol means or does?”. Helpfully, the page informs you that the underscore has “many different meanings”, and neglects to expand further on the topic. *headexplode*
Other, more useful explanations include Scala _ [underscore] magic and, for reference (not explanation), this StackOverflow post: What are all the uses of underscore in Scala?
OK, enough linkspam. Here’s my doodle:
TLDR; I think of the underscore as the “meh” operator. :)
…also, I really need to get better at drawing.