刚出来,仅供了解,这里的“交易”是指业务的原子性,常见于数据库中。与区块链或密码学中的交易,是不同的概念。类似于 STM。
Repo
一看就是国人的项目。命名有点玩耍的味道,但是思路和设计可以借鉴。
use duang::duang;
duang!(
pub fn foo<T>(a: T, b: f64 = 13.0, c: T = a * a) -> (T, f64, T)
where
T: std::ops::Mul<T, Output = T>,
T: std::fmt::Display,
T: Copy,
{
(a, b, c)
}
);
// ----
use demo_duang::foo;
// pass
assert_eq!(foo!(1, c = 30, b = -2.0), (1, -2.0, 30));
// pass
assert_eq!(foo!(a = 10), (10, 13.0, 100));
// fail
// foo!(1,c=30,c=2);
Repo
这个工具发布 v2.0 了。就是 du 的升级版。先看下效果图。
Repo
不过这个UI是用于游戏内的UI。
Repo
对于这些文件,就可以放心删除。这在重构的时候很有用。来看一下效果图:
Repo
作者说,在网上,总是听到说Rust这里好那里好,那么,Rust不好的地方有哪些?
这里就简单汇总一下人们的吐槽:
Read More
要比较语言,莫过去用它们实现同一个项目/工程了。作者是一个学生,他们被布置实现一个Jave的子集到x86的编译器。不同的组用了不同语言自行实现。不过,这次这篇文章只是比较了实现同一个编译器需要用到的代码量。其实这个很不客观,因为不同小组实现同一个目标的设计思路和算法都不同。但是这还是能给人一点参考意义,至少知道一个大概的量级和复杂度。