Alastair Robertson

Results 104 comments of Alastair Robertson

> Do you mean that `@x` should get its type from `@x =1`? Yeah. Maps aren't required to be defined before they're used, since they're shared across probes and so...

Agreed that declaring maps up front would be useful for big programs (opened an issue for it here: #2954). But type deduction is useful for ad-hoc investigations and we shouldn't...

I am thinking that it might be useful to have a "strict mode" which prints errors at runtime if a program attempts to read from an undefined map (it can't...

> Should it print the map twice? Once with `@: 0` and again at the end when it dumps the map `@: 1` ? Yep, exactly. The `print` will read...

> > I am thinking that it might be useful to have a "strict mode" which prints errors at runtime if a program attempts to read from an undefined map...

Good point, I suppose that's the same issue. This would make sense to me then: ``` @a["0"]: "123" @b[0]: 123 ```

One use I can see for automatically quoting strings is to highlight leading/trailing whitespace: ``` # bpftrace -e 'BEGIN { @["abc", " def"] = "trailing? "; exit(); }' Attaching 1...

I don't think that formatting for debugf is too important - it's an undocumented, developer-only feature AFAIK

It's actually an issue with all our reserved keywords, not just "config". It's just that config happens to be a more commonly used word in user-defined types. I've updated the...

Our users in Meta have started using the for-loop syntax now, so this isn't a priority for them. The syntax in this PR is definitely nicer, but there are two...