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

"The fact that i have to predetermine the length of a string is laughable... Thats not the case with js or even with php to some extent."

It's not laughable. Most implementations of JS and PHP are probably written in C or C++. While using dynamically allocated strings in higher level languages like these are indeed easier than null terminated strings in C, at some point someone somewhere had to write code at a lower level to support this.



> at some point someone somewhere had to write code at a lower level to support this

Yes that is something i totally agree with. In fact that's why i only supported js and not hate c. Because somewhere it has to be done and c is efficient in dealing with memory allocations whereas js deals with front-end mechanics. But to say that js is 'crazy' is something beyond me. every language has its ways and it depends on what 'level' (high, low, machine) that language works in computer hierarchy.

Comparing high level language like js to lower level language (like c++, java, etc) on their syntax or how it deals with objects/arrays makes no sense.


Well, given that javascript was designed in somehow less time and with less resources than superior languages it has obviously some inconsistences and everybody agrees on that. On the other side if you know the language really well you can avoid the most of the problem it has. I like your point of 'keep it real' but you need to accept that the language is far from 100% correct.




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

Search: