Repository navigation
v0.3.1
Language
- A
Resultliteral takes its other half from where it is used:half(4) == Result.Ok(2)compares twoResult<Int, Str>s, either side round, inassertand out of it.x := Result.Ok(...)takes the error type from the first later use that says it, asatdoes, and is a compile error when nothing does. - A generic parameter reads its variables off a generic type's arguments:
count(b: Box<T>)handed aBox<Int>iscount_Int, nested and across modules alike. A constructor is aimed by a declared type or a declared return type, soPage([], 1)builds thePage<Entry>it is declared as, and a partial application whose holes leave a type variable unfixed is a compile error. hive.map.setanddeleteneed amutmap, asappendneeds amutvector: afunccould write its parameter's map, and the caller's map saw half of the write.- A
Secretis read from a document:T.decodereads aSecret<U>field as theUit holds and keeps it the waybypassdoes. Writing one out —encode, a message — is still refused.
Standard library
hive.sqlmatches a row's columns to its fields by name, in any case, as the spec always said; the columns were read by position, so a reorderedSELECTswapped two fields of one type in silence. A column that fills no field, or a field no column fills, is aSqlError.Shapenaming it — even when no row comes back.
Tooling
- Two compilers reading imported Go files at once no longer read each other's: each copies its file under a name of its own, and the reader tool is written atomically.
Breaking
| was | is |
|---|---|
hive.map.set(m, …) on a name that is not mut |
declare it mut |
x := Result.Ok(v) with nothing saying the error type |
Result<T, E> x = Result.Ok(v), or a use that says it |
a SELECT whose column names are not the row's fields |
an AS alias naming the field |
To bootstrap from this release, seed/pinned.txt becomes:
tag: v0.3.1
asset: hivec-linux-amd64
sha256: 2612137b5e2814885b452d8483eb1ff1ccf419682e0502bbd912859317a585c0