evylang / todo

0 stars 0 forks source link

Tighten builtin signature for join and font #94

Closed juliaogris closed 2 months ago

juliaogris commented 2 months ago

@camh- :

join is documented to take []string but actually accepts anyarray: print (join [1 2 3] ",") works.

We should tighten up the built-ins where they take GENERIC composites. We don't need that any more in many cases now that you fixed the typing. the font builtin should be able to just take map[any] and {foo: 1} will be properly converted now to map[any]

camh- commented 2 months ago

There is a test case for join: print (join [1 true "x"] ", ") for which it expects the result "1, true, x\n" - perhaps join should be taking []any ?

https://github.com/evylang/evy/blob/main/pkg/evaluator/evaluator_test.go#L942

camh- commented 2 months ago

Oops. Forgot to tag this issue in https://github.com/evylang/evy/pull/326

Updated the font signature. Left join as is.

camh- commented 2 months ago

Hmmm, still need to update the docs for join. Reopening