Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Man, that AWK looks a helluva lot like Javascript.


As in Javascript, awk represents all numeric values using double precision floating point. I have always thought that was a strange (but not necessarily bad) choice for a language that is basically all about text processing. I guess it works out pretty well if you need to do 3D graphics math.

There is a bit of cheating going on here though. Awk doesn't support true multidimensional arrays. They are depending on a Gawk extension for that bit of functionality.


Actually I tried to do without true multidimensional arrays, but deleting and sorting elements would be a pain.


Double precision floats can losslessly manipulate integers with up to 56 bits precision, so you get the best of both worlds with no extra effort.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: