Hacker News new | past | comments | ask | show | jobs | submit login

OP didn’t say Gleam is dangerous in general. They said it’s dangerous anywhere around physical or financial values. Your app isn’t critically dealing with either, so it’s not really a retort to their point.



You'll find that keeping my client information's integrity is as important to me as keeping the financials.

That, however, is still not enough to alleviate OP's concerns, which is why I've explained how the `1/0=0` problem can be entirely avoided.

I expect entirely avoiding the problem OP mentioned is enough to alleviate the concerns it raises.


> keeping my client information's integrity is as important to me as keeping the financials

Nobody is questioning your intentions. People writing apps in memory-unsafe languages don’t give fewer shits. They’re just more prone to certain classes of errors.

> how the `1/0=0` problem can be entirely avoided

1/0 problems are generally expected to be entirely avoided. This is about where the system behaves unexpectedly, whether due to human error or the computer being weird.


Correct, these are all trade-offs we make when building a product. Choosing between the "1/0 crashes your program" problem and the "1/0 returns 0" problem is one such tradeoff.

All I was doing was clarifying the impression OP gave.

Now that we all know the details we can make whatever tradeoff we prefer.


Let's be clear. Gleam is still a bit of an esolang. If you had a company and onboarded a junior onto it would you expect them to know that 1/0 == 0? As a senior doing code review for said junior, would you be confident that you would correctly think through every corner case when you encounter the / operator?

Its the year of the Lord 2024, why is a new language putting in such a huge footgun out of the box in its stdlib.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: