You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Breaking changes
golisp.(*LVal).MapGet (issues: elps#829, substrate#775): Deprecated untyped getter; no callers. Use lisp.AsMap then lisp.Lookup[T](m, key).
golisp.(*LVal).MapGetLVal (issues: elps#829, substrate#775): Replaced by lisp.Lookup[T](m, key) with an *LVal key, which reports a missing key as ok=false instead of an error value. substrate#775 migrates its 4 callers.
golisp.(*LVal).MapGetString (issues: elps#829, substrate#775): The name read as if it returned a string. Replaced by lisp.AsMap then lisp.Lookup[T](m, "key"); a missing key is ok=false instead of an error value. Owner-approved break; substrate#775 migrates its 71 callers.
golisp.Field (issue: elps#829): On main but in no tag; renamed lisp.Lookup[T], which takes a MapView and a generic key.
Changes
Go embedding API for builtins: new helpers for writing builtins in (value, error) form and reading arguments: FuncE, Func1E/Func2E/Func3E/Func3, Text, ArgReader (Int, Bytes, Map, Fun, Seq), Cells (List, Vector, Map, MapIfChanged, Clone, Append, Read, SExpr, Strings), Result, ConditionOf, ResultAs, Name.
Map and sequence helpers:MapView, AsMap and Lookup[T] for typed map reads; LEnv.SortedMapOf, LEnv.MapOf and lisp.MapOf to build sorted maps from Go values; LEnv.MapPut, LEnv.MapLookup, LVal.All, LVal.Keys, MapKey.Name, LVal.SeqCells, SeqOf, StringList.
Arrays and values:ArrayParts, SetArrayData and SetArrayCells; LVal.IsError and LVal.IsSymbol (both return false for a nil *LVal); LEnv.ToString, LEnv.FormatString, LEnv.CheckAlloc, FunInPackageDoc.
Stdlib:libstring.Join is exported; the math builtins read their arguments with Func1E/Func2E.
elpsvet: new importable elpsidiom analyzer that suggests the Go-style helpers for Go ports of Lisp code. elpsbuiltinstate moved to an importable package. The elpsidiom fix gate now covers package lisp, and its fixes were applied across the codebase.
Docs: describes MapView, Lookup, Cells.Strings and the rule that API compatibility covers tagged releases only.
Build: moved to Go 1.26.9 and golang.org/x/net v0.60.0.