Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: Numerical Implementation in New Language?
1 point by keepamovin 29 days ago | hide | past | favorite
I'm building a new language. It's mostly for security-related scripting, but I'm considering adding something to do real number calculation (i.e, ℝ)

Right now we just have 64-bit signed integers. A single numeric type. I like that. It's easy, simple and clean.

If going to extend, could add floats. But floats have a few variants. And then there's imprecision. So BigInts and BigDecimal lure. But the overall lang philosophy is: clean, direct, no magic, low bullshit, and simple. I don't want to add multiple types (only 1 for ℝ, if even that). I probably shouldn't even add anything, but it does seem useful, or maybe just interesting.

Seeking advice from people who have experience implementing the same in a new language or otherwise dealing with these kind of issues or simply care a lot about developer ergonomics / language aesthetics? What are the best ideas for this that you know?



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

Search: