FizzyOrange

joined 1 year ago
[–] FizzyOrange@programming.dev 7 points 1 month ago (1 children)

Isn't Elixer dynamically typed?

[–] FizzyOrange@programming.dev 17 points 1 month ago (1 children)

Its definitely best to try and avoid raw pointers, but even if you try really hard I found it's not really possible to get a Rust-like experience with no UB.

Even something as simple as std::optional - you can easily forget to check it has a value and then boom, UB.

The C++ committee still have the attitude that programmers are capable of avoiding UB if they simply document it, and therefore they can omit all sanity checks. std::optional could easily have thrown an exception rather than UB but they think programmers are perfect and will never make that mistake. There are similar wild decisions with more recent features like coroutines.

They somehow haven't even learnt the very old lesson "safe by default".

If I wanted memory unsafety I think I would consider Zig instead of C++ at this point.

[–] FizzyOrange@programming.dev 46 points 1 month ago (5 children)

Rust for now, by a wide margin. But I'm following other languages that I think have the potential to surpass it, including Vale (promises way more than it delivers currently), Koka, Hylo, maybe Lobster.

[–] FizzyOrange@programming.dev 9 points 1 month ago

Almost everyone uses Cargo. I think the only people that don't are Google and Facebook who will probably be using Bazel or Buck2. I think you're a bit confused about what Cargo is.

[–] FizzyOrange@programming.dev 7 points 1 month ago

Yeah but this one is actually good. So hopefully it will displace all the others.

[–] FizzyOrange@programming.dev 6 points 1 month ago* (last edited 1 month ago)

Wow look at that CUPS code and tell me with a straight face there aren't 5 more similar vulnerabilities waiting to be found...

[–] FizzyOrange@programming.dev 3 points 1 month ago

I seriously wonder what kind of circumstances lead someone to be this irrationally devoted to such a flawed and outclassed language. Probably best if I just block you though...

[–] FizzyOrange@programming.dev 2 points 1 month ago

Unlikely to be of any use to anyone in practice because you can fit a 12k gate chip into a grain of sand and then it doesn't really matter if it's not flexible.

Interesting tech though.

[–] FizzyOrange@programming.dev 15 points 1 month ago

Go to bed, you're drunk.

[–] FizzyOrange@programming.dev 2 points 1 month ago

I've never done it but apparently you can actually gradually transition to Typescript one file at a time by renaming them from .js to .ts. Might help a bit. Good luck anyway!

[–] FizzyOrange@programming.dev 73 points 1 month ago (3 children)

Actual blog post.

Great accomplishment. I think we all knew it must happen like this but it's great to see real world results.

I think this is probably actually the most useful part of the post:

Increasing productivity: Safe Coding improves code correctness and developer productivity by shifting bug finding further left, before the code is even checked in. We see this shift showing up in important metrics such as rollback rates (emergency code revert due to an unanticipated bug). The Android team has observed that the rollback rate of Rust changes is less than half that of C++.

I think anyone writing Rust knows this but it's quite hard to convince non-Rust developers that you will write fewer bugs in general (not just memory safety bugs) with Rust than with C++. It's great to have a solid number to point to.

[–] FizzyOrange@programming.dev 2 points 1 month ago (2 children)

Yeah IntelliJ does amazingly without type annotations but even it can't do everything. E.g. if you're using libraries without type annotations, or if you don't call functions with every possible type (is your testing that good? No.)

Static types have other benefits anyway so you should use them even if everyone in your team uses IntelliJ.

view more: ‹ prev next ›