kji
Joined 10 years ago
Joined 10 years ago
This is definitely a take, given how easy it is to write a program with security bugs using Solidity due to specific concerns like reentrancy that only exist due to the unique way smart contracts work. The inability to "undo" a fraudulent or mistaken transaction without requiring all validators to fork the chain also makes this a non-starter for many developers.
> your users pay to update the state of your application
Also a weird thing to call a "feature" for developers when this actively drives away potential users.
[1]: https://source.chromium.org/chromium/chromium/src/+/main:thi...
> Imagine you begin a journey in Seattle WA, facing exactly due east. Then start traveling forward, in a straight line along the Earth’s surface.
Where does it say to "travel exactly due East"?
> Imagine you begin a journey in Seattle WA, facing exactly due east. Then start traveling forward, in a straight line along the Earth’s surface.
where there isn't any wording saying "go east in a straight line".
For one, clients (mobile, desktop) are drastically different with all sorts of downstream implications:
- Differing screen size requiring responsive design
- Internet speeds magnitudes different
- Intermittent internet
- Uneven feature support due to different versions of browsers
- Everything needs to be JS at the end of the day
Desktop apps generally don’t have to worry about any of these issues.
Also, desktop GUI frameworks are typically either fragmented (one per OS) or don’t look OS-native.
type MyUnion = { type: "foo"; foo: string } | { type: "bar"; bar: string };
vs type MyUnion = Foo of { foo: string } | Bar of { bar: string };
You still need some runtime encoding of which branch of the union your data is; otherwise, your code could not pick a branch at runtime.There's a slight overhead to the TypeScript version (which uses strings instead of an int to represent the branch) but it allows discriminated unions to work without having to introduce them as a new data type into JavaScript. And if you really wanted to, you could use a literal int as the `type` field instead.
val is_admissible : min_age:int -> max_age:int -> bool [1]: https://engineering.fb.com/2018/05/22/open-source/open-sourcing-katran-a-scalable-network-load-balancer/
[2]: https://blog.cloudflare.com/unimog-cloudflares-edge-load-balancer