1,364 karma · joined January 10, 2021
GitHub: https://github.com/David-Kunz
- Rust forces you to deal with errors and "null" values (Option). If you just unwrap them, it's visible.
- Rust requires systems with clear ownership. You can opt out with various smart pointers, it's visible.
- Rust requires you to use Box for heap allocations, it's visible.
Note: I'm not talking about optimal solutions in the sense of "best algorithm", more in the sense of "well thought out and without lazy shortcuts".
- Rust is a complicated language, so novice developers probably use something else.
- Its ownership/borrowing system makes sure that architecture is not an afterthought (unless you pollute your code with countless smart pointers).
- You get memory safety in safe Rust code and don't need a garbage collector.
- Non-optimal solutions usually are visible/more cumbersome to write.
In the end it's up to the individual developer, but Rust really helps to produce high-quality code.
1) you know what you want 2) the alternative would require manual navigation to multiple UIs and/or many interactions
Edit: This doesn't mean Vim is discontinued.
const express = require('express')
const app = express()
// define the model for a user
const User = {
name: '',
email: ''
}// create a new user
app.post('/users', (req, res) => {
const user = Object.assign({}, User, req.body)
// save the user to a database, etc.
res.send(user)
})// read a list of users
app.get('/users', (req, res) => {
// retrieve a list of users from the database, etc.
res.send([
{ name: 'Alice', email: 'alice@example.com' },
{ name: 'Bob', email: 'bob@example.com' }
])
})// read a single user
app.get('/users/:id', (req, res) => {
// retrieve a user with the specified id from the database, etc.
res.send({ name: 'Alice', email: 'alice@example.com' })
})// update a user
app.put('/users/:id', (req, res) => {
// retrieve the user with the specified id from the
database, etc.
const user = Object.assign({}, User, req.body) // save the updated user to the database, etc.
res.send(user)
})// delete a user
app.delete('/users/:id', (req, res) => {
// delete the user with the specified id from the
database, etc. res.send({ message: 'User deleted' })
})app.listen(3000, () => {
console.log('Listening on port 3000')
})- Reveal.js: https://revealjs.com/
- Lookatme: https://github.com/d0c-s4vage/lookatme
- Marp: https://marp.app/
- Slidev: https://sli.dev/
The opposite of what you write is true. Physicists are eager to see where theory doesn't fit reality, that might even lead to a nobel price. Even statistical fluctuations are sometimes hyped as breakthrough experiments.
Posted by @davely today.
https://logbuch-netzpolitik.de/lnp433-auf-yolo-konfigurieren
(In German)
Applied to language, the word 'very' is great. It can be used in many occasions and is generally understood. What's wrong with that?
- Rust is a systems-level language and requires developers to be experienced in order to create big software components. This usually leads to better quality.
- Rust rewards putting effort upfront (e.g. error handling, Option<T>, ...) leading to less bugs than more forgiving languages.
- Rust uses zero-cost abstractions which enables efficient code. In other languages it's a lot easier to degrade your performance by accident.
- Rust can easily create binaries for the most relevant architectures, so your programs tend to be portable.
- The contribution story is great, your code tends to be correct and you don't need to watch out for many foot guns. I've done it myself for Helix and the experience was awesome [1].
But take everything with a grain of salt, you can create bad software in every programming language.
Here's a small video showing the new features of Neovim 0.8.