Live data from Hacker News

Cot: The Rust web framework for lazy developers

cot.rs

61–70 of 71 posts

Re: Cot: The Rust web framework for lazy developers

#62
post #58

Earlier quoted context omitted.

I mean, who thinks using .clone() everywhere is such a good idea?

It's a suggestion for beginners writing their first Rust program. You wouldn't do this once you feel comfortable with the language.

They might end up with a bad habit, however.

Re: Cot: The Rust web framework for lazy developers

#64
post #23

Earlier quoted context omitted.

Opinionated frameworks are very useful. They create well-worn paths that others have tried before. Every python flask environment I've ever seen has been a bespoke configuration with some selection of the massive combinatoric space that flask presents to folks. Contrast that with python Django or Ruby on Rails where opinions abound, but you can escape the well worn path if you _need_ to.

Honestly as someone who has been building Rails applications for over 15 years now, I find far too many people think they are special and need to stray from the defaults.

Absolutely. That inclination exists everywhere.

Imagine if your framework said,"let a thousand flowers bloom."

Re: Cot: The Rust web framework for lazy developers

#66
post #31

I'm still surprised no one in the golang world has put together a Django type framework. While I like the bring-your-own unixy philosophy of this stuff in the go world; I still really loved django for quick decent applications.

More like Rails (well, Laravel) than Django, and not by far as mature yet, but there’s Goravel.

Re: Cot: The Rust web framework for lazy developers

#67
post #53
post #18

Earlier quoted context omitted.

> And I am a Rust developer... Seeing this term makes me cringe every time. I write blazingly fast statically allocated Rust on my Arch Linux Thinkpad, btw.

If not a joke can you explain what is statically allocated rust

Maybe it's a joke about how painful it _can_ be, to use `static` or `static mut`?

Re: Cot: The Rust web framework for lazy developers

#68
post #38

Earlier quoted context omitted.

Jesus fucking christ not this again. https://without.boats/blog/why-async-rust/ There are entire articles explaining precisely why. Your lack of knowledge contributes very little to an article about a framework.

That article assumes that there needed to be language level support for asynchronous programming, beyond non-blocking operations. My point is that that is not true. If you want to use the blocking paradigms for asynchronous programming, then yes, there does need to be some magic added to make it work. If, however, you are comfortable with asynchronous programming (and it is not hard) then all you need are the non-blo…

Its massive adoption proves you wrong. You’re welcome to use epoll/kqueue manually if you want. Doesnt mean there’s no need for the ecosystem.

Re: Cot: The Rust web framework for lazy developers

#69
post #29
post #25

Earlier quoted context omitted.

> Rust is not a language for lazy developers. I am one, and Rust absolutely can be. > Lazy developers won't fight with the borrow checker. You don't fight the borrow checker when writing web code. The request flow is well suited for rarely, if ever, testing the borrow checker. > Instead, think more critically about why a Rust developer would need a web framework The same reason anyone would need a web framework. Anyt…

It's absolutely not true, the moment you're out of http hello word, and you have more serious logic about data that you need to manipulate / modify you will fight the borrow checker, that's why a lot of people do a lot of rc / arc refcell. And then the async implementation.

Have you ever written a web app in Rust? Most of the code is in a form of handlers that receive data, process the data and give some data back. There is rarely need to think about lifetimes or borrowing in these scenarios.

Re: Cot: The Rust web framework for lazy developers

#70
post #7

> ORM integration I don't trust a web framework that's opinionated about how I use my database. It's very hard to get a web framework right, and it's very hard to get an ORM right. Getting both right is nearly impossible. In a situation like this, try to be the best web framework you can be, and then gravitate towards whatever ORM(s) becomes popular. Take a look at Express for Node.js. It's my favorite web framework…

> Lazy developers won't fight with the borrow checker

Once you get the hang of it, it's not a big effort any more. And the really lazy option is to just use an Arc.

Post reply on HN