There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

sunbeam60 , (edited )

I do think Zig is better for this kind of thing.


<span style="color:#323232;">const ret = try do_thing();
</span><span style="color:#323232;">
</span><span style="color:#323232;">if( ret ) | result | {
</span><span style="color:#323232;">   do_something_with_result(result);
</span><span style="color:#323232;">}
</span>

The try keyword returns any error up; the if-unwrap works with what came out of a successful call. Normally you wouldn’t have both, of course.

do_thing would be defined as a union of an error (a distinct kind of type, so it can be reasoned about with try, catch and unwrapping) and the wrapped return value.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines