I hereby claim:
- I am deedlefake on github.
- I am deedlefake (https://keybase.io/deedlefake) on keybase.
- I have a public key ASBAslmyHWY1vLJG-aQw5Nnc2ElZK0zwqk2ipj5EJB9kMQo
To claim this, I am signing this object:
package main | |
import ( | |
"bufio" | |
"bytes" | |
"container/heap" | |
"fmt" | |
"io" | |
"os" | |
"regexp" |
fn fib() -> Box<FnMut() -> i32> { | |
let (mut a, mut b) = (0, 1); | |
Box::new(move || { | |
let c = a + b; | |
a = b; | |
b = c; | |
a | |
}) |
#include <iostream> | |
#include "test.h" | |
class Test | |
{ | |
protected: | |
const char *str; | |
public: |
BenchmarkBinaryTree17-4 5022008650 -6.02% | |
BenchmarkFannkuch11-4 4645926951 -23.40% | |
BenchmarkFmtFprintfEmpty-4 84.9 -7.30% | |
BenchmarkFmtFprintfString-4 266 -20.30% | |
BenchmarkFmtFprintfInt-4 264 -20.08% | |
BenchmarkFmtFprintfIntInt-4 420 -24.05% | |
BenchmarkFmtFprintfPrefixedInt-4 391 -17.65% | |
BenchmarkFmtFprintfFloat-4 549 -16.58% | |
BenchmarkFmtManyArgs-4 1711 -20.86% | |
BenchmarkGobDecode-4 12907474 -9.27% |
BenchmarkFannkuch11-4 -18.05 | |
BenchmarkFmtFprintfEmpty-4 -8.89 | |
BenchmarkFmtFprintfString-4 -20.36 | |
BenchmarkFmtFprintfInt-4 -22.18 | |
BenchmarkFmtFprintfIntInt-4 -28.06 | |
BenchmarkFmtFprintfPrefixedInt-4 -20.63 | |
BenchmarkFmtFprintfFloat-4 -19.17 | |
BenchmarkFmtManyArgs-4 -22.47 | |
BenchmarkGobDecode-4 -12.68 | |
BenchmarkGobEncode-4 -11.14 |
diff --git a/PKGBUILD b/PKGBUILD | |
index 8ef2f13..10f59e4 100644 | |
--- a/PKGBUILD | |
+++ b/PKGBUILD | |
@@ -20,9 +20,11 @@ build() { | |
# Force our own git checkout | |
export GOPATH="$srcdir" | |
mkdir -p "$GOPATH/src/github.com/spf13" | |
ln -s `pwd` "$GOPATH/src/github.com/spf13/hugo" | |
I hereby claim:
To claim this, I am signing this object:
One of the issues with the syntax of check
, as proposed, is that chaining method calls with error returns will look really, really bad. For example, check (check (check v.m1()).m2()).m3()
. The common way around this in many languages, as mentioned in the draft, is the use of ?
as a postfix operator instead of prefix keyword, but this has other problems, including resulting in similar illegibility if there are nested function calls, such as in f1(f2(f3()?)?)?
. It also would make it unique amongst the various Go control flow modifiying language structures as all of the other ones are keywords.
When check
is given a compound function expression, such as nested function calls or chained methods, it applies to all calls in the expression, not just the one it was specifically attached to. The previous two examples then become check v.m1().m2().m3()
and check f1(f2(f3()))
, respectively. All other aspects of check
remain the same,
package main | |
import ( | |
"fmt" | |
) | |
type Pair[T1 any, T2 any] struct { | |
First T1 | |
Second T2 | |
} |
package main | |
import ( | |
"context" | |
"crypto/tls" | |
"flag" | |
"fmt" | |
"io" | |
"log" | |
"os" |