this post was submitted on 16 Oct 2024
65 points (97.1% liked)

Rust

5953 readers
8 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 1 year ago
MODERATORS
 

If we were to create a Rust version of this page for Haskell, what cool programming techniques would you add to it?

you are viewing a single comment's thread
view the rest of the comments
[–] barsoap@lemm.ee 1 points 2 weeks ago (1 children)

I try not to and if I have to I'd use string interpolation. I'm not even sure whether you're pulling my leg right know, I literally don't remember whether they have a string append operator.

Like 99.999% of the sh I ever wrote was in Makefiles and short wrapper scripts which could just as well be aliases. No argument handling past $@, no nothing the language is just too fickle for me to bother dealing with. The likes of zsh are make-up on a pig, I think I had a quick run-in with fish but never really got the hang. Nushell is different, it's actually bold enough in its changes to get rid of all the crufty nonsense.

[–] BB_C@programming.dev 1 points 2 weeks ago (1 children)

Sorry, I thought you meant the use of .. in Rust is odd. So I pointed out that {0..9} and{a..z}is also used at least in bash and zsh. That's at least 10s of millions of users!

I know of .. being used for appending by lua at least. So still not odd-ball I would argue, since the people who interacted with lua code in their life probably outnumber those who interacted with all functional languages combined.

[–] barsoap@lemm.ee 1 points 2 weeks ago (1 children)

Now that you mention it yes Lua is probably the one that I remember. It's an incredibly well-designed language from start to finish but also culturally an odd-ball. .. isn't even the biggest offender: Their indices start at 1. Haskell accosts you with zygohistomorphic prepromorphisms but at least [1,2,3] !! 1 is 2.

[–] BB_C@programming.dev 1 points 2 weeks ago

Their indices start at 1

Why do you hate zsh so much? 🙂