News for hackers. Stuff that matters.
Re:Ask HN: What startup/technology is on your 'to watch' list? by typon on Saturday May 23, 2020 @03:43AM (#23280847)
But surely it's a step towards more safety. Compare to passing char * around or ref/ptr to string.

Sure C++ doesnt have a borrow checker but these types encourage the idea of "reifying" lack of ownership rather than keeping it ad hoc

Re:Ask HN: What startup/technology is on your 'to watch' list? by benibela on Saturday May 23, 2020 @08:58AM (#23282549)
I have always used Pascal for memory safe strings. Reference counted, mutable xor aliased, bound checked: their safety is perfect.

Unfortunately there is no string view, so you need to copy the substrings or use pointers/indices. I tried to build a string view, but the freepascal compiler is not smart enough to keep a struct of 2 elements in registers.

Re:Ask HN: What startup/technology is on your 'to watch' list? by temac on Saturday May 23, 2020 @07:28AM (#23282070)
You don't infer potential ownership from a C++ ref. Likewise for char* strings unless it is to interface with a C api, in which case you will keep it anyway.