
Red
Rust Brain Teasers: Doubling the right value (page 69?)
The page number is absent for the “card” pages unfortunately, but it’s before page 70.
println!("2 * 4 = {}", double_it(2));
should be
println!("2 * 4 = {}", double_it(4));
It won’t change the outcome, but I’d put a “4” at least just for the sake of clarity.
First Post!

Red
I must admit that missing features like overloading and default parameters requires some boilerplate code sometimes, it’s sad. Hopefully they’ll get around to providing that in a distant future but it seems to require a tremendous amount of discussion before reaching any decision.
In comparison, Kotlin has its development started slightly later by a small team (at Jetbrains) and is now much more flexible. It also includes more libraries, for which Rust must rely on external crates (and are for the most part yet in beta stage…).
Those are the little drawbacks of this otherwise awesome language.
Popular Pragmatic Bookshelf topics










Other popular topics










Categories:
Sub Categories:
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /rails
- /js
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /java
- /haskell
- /emacs
- /svelte
- /onivim
- /typescript
- /crystal
- /c-plus-plus
- /tailwind
- /kotlin
- /gleam
- /react
- /flutter
- /elm
- /ocaml
- /ash
- /vscode
- /opensuse
- /centos
- /php
- /deepseek
- /zig
- /scala
- /html
- /debian
- /nixos
- /lisp
- /agda
- /react-native
- /textmate
- /sublime-text
- /kubuntu
- /arch-linux
- /revery
- /ubuntu
- /manjaro
- /spring
- /django
- /diversity
- /nodejs
- /lua
- /c
- /slackware
- /julia
- /neovim