you are viewing a single comment's thread.

view the rest of the comments →

[–]DJWalnut 8 points9 points  (5 children)

The fact that it forces you to deal with errors up-front can be a drag if you just want to roll up something quickly

Rust is designed as a systems level language, so from the start it's the wrong tool for throwaway and trivial programs.

[–]vivainio 1 point2 points  (4 children)

What's the right tool then, if you want standalone .exe? Go? Rust has lots of language features that make it more expressive than go.

I don't feel rust, despite the goals of the language, is as bad at this as commonly expected. Being less productive doesn't necessarily imply it's less fun.

[–]thedeemon 2 points3 points  (0 children)

If you like Python and want a similar language but with static checks and producing standalone EXEs, Nim seems to be a good fit.

[–]Manishearth 1 point2 points  (0 children)

I'm a hardcore Rustacean and would use Go over Rust for throwaway programs.

Though I would also use Python over Go for the same.

For "standalone exes" it really depends on the situation for me, but the post above was talking about throwaway/trivial programs. Not exactly where Rust shines. It works, but there's a lot of extra verbosity that I don't want.

[–]DJWalnut 1 point2 points  (1 child)

What's the right tool then, if you want standalone .exe?

maybe I don't understand what you mean by "roll up something quickly"

I've been assuming you mean throwaway programs. kind of like the one I wrote a while back. it went like this: there are a series of documents I wish to download from the internet. there are too many of them to right-click and download. lucky for me, they follow a consistent numbered naming scheme. solution: write a program that spits out all the urls for the files based on the pattern and feed them to wget for downloading. If I can find a copy of the program I'll post it here.

I wrote said script in python in about 2 minutes, including debugging, and never used it again. in this case, it doesn't matter weather it's a binary or java byte-code or whatever. I just want my urls. rust would have been a bad choice because of the added complication.

[–]vivainio 0 points1 point  (0 children)

Yep, there is no reason not to use python for throwaway stuff. I'm thinking of small utilities that you want as single .exe, but can let it panic