4 ms·
> To actually be bootstrapped, they had to add all this other stuff like vectors and hash tables. Just like C had to add things like arrays to the Turing machi
by clacke2 10y ago
> To actually be bootstrapped, they had to add all this other stuff like vectors and hash tables.
Just like C had to add things like arrays to the Turing machine? C doesn't even have hash tables in the spec! According to your definitions, C is a toy language.
- chubot 10y agoNo, because it's possible to implement efficient hash tables with C's primitives -- in fact that's how hash tables in essentially ALL languages ARE implemented. cons cells are not sufficient to implement hash tables. Scheme needs arrays for that. cons cells can be implemented efficiently using arrays, but the converse isn't true, so arrays are more fundamental in some sense. If you don't care about algorithmic efficiency, then you could choose either cons cells or arrays as your primitive. But obviously we do care, so arrays were the right choice. IOW, C was the right choice, not Scheme.
- nickpsecurity 10y ago"No, because it's possible to implement efficient hash tables with C's primitives -- in fact that's how hash tables in essentially ALL languages ARE implemented." Because each architecture has a C compiler that's been highly optimized. Popularity plus money invested. That's it. If you were right, we'd see optimizations coded in C even when alternative, optimizing compilers were available. I got a one-word counter to that interestingly enough from "high-performance computing" field: FORTRAN. Free Pascal people are doing fine in performance and low-level code as well despite little to no investment in them. Seems throwing money at a turd (eg FORTRAN, C) can get a lot of people's hands on it despite some of us shuddering and saying "Get that pile of crap away from me!"
- pjmlp 10y agoIt is a toy language. One step above a portable macro assembler, developed in a decade where research labs outside AT&T were already using safe systems programming languages for about a decade. Their big failure was that they were selling their work, instead of doing like AT&T that initially gave UNIX for free, because it was forbidden to sell it. Unfortunately free always wins, regardless of quality.
- sklogic 10y ago> in fact that's how hash tables in essentially ALL languages ARE implemented Obviously a false statement.
- davexunit 10y ago>cons cells are not sufficient to implement hash tables. Again, cons cells are not the only primitive type for making compound data structures.
- fredmorcos 10y ago> Just like C had to add things like arrays to the Turing machine? Care to elaborate on that?