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

> Marshaling is an important, and neglected, subject in language design. Compilers really should understand marshaling as a compilable operation.

I generally agree with what you're saying.

This is one of the things COBOL, of all languages, generally got right: You had a Data Definition language, which has been carried over to SQL, and the compiler could look at the code written in that language to create parsers automatically. Of course, COBOL having been COBOL, this was oriented to 80-column 9-edge-first fixed-format records with all the types an Eisenhower-era Data Processing Professional thought would be important.

The concept might could use some updating, is what I'm saying.

> Most modern CPUs copy very fast and in reasonably wide chunks.

And most modern OSes can finagle bits in the page table to remove the need for copying.

> strings are Unicode

By which you mean UTF-32BE, naturally. ;)

> It's really time to insist that the only web encoding be UTF-8, by the way.

This might actually be doable, if only because of all the smilies that rely on Unicode to work and the fact UTF-8 is the only encoding that handles English efficiently.



And most modern OSes can finagle bits in the page table to remove the need for copying.

That tends to be more trouble than it's worth. It usually means flushing caches, locking lots of things, and having to interrupt every CPU. Unless it's a really big data move (megabytes) it's probably a lose. Mach did that, and it didn't work out well.




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: