Re:Why should I have written ZeroMQ in C, not C++
by Drbble on Thursday May 10, 2012 @12:42PM
(#3954437)
What about, say, a function that puts ten elements into a list that needs to get sent a receiver that only expects nine ? Or a network call that returns an unparseable reply?
[ Parent
| on HN ]
Re:Why should I have written ZeroMQ in C, not C++
by gaius on Thursday May 10, 2012 @01:24PM
(#3954702)
In the first case, I wouldn't use a list for that, but a record/struct/class with 9 fields. In the second, I would use an Either/Maybe type, or raise an exception (these work differently in OCaml than in C++)