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

Web workers are atrocious though. They're very strangely hobbled by either requiring a serialize->deserialize round-trip when passing data back and forth, or you can sidestep it by 'transferring' the object across contexts (it then 'disappears' in the original context). The reasons for doing it rather than sharing are obvious (the race conditions would be hard to track down, etc.) - but there's no escape hatch for languages like ClojureScript which has immutable data-structures (and therefore don't care about mutable race conditions) and persistent/structural-sharing datastructures (and therefore would be very costly to serialize/deserialize, or totally broken by the transfer model).

Really a shame.



Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

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

Search: