Migrating From Llama
Freeze is close to a drag-and-drop replacement for projects that currently use Llama, however you'll need to be aware of incompatible changes.
Feel free to file an issue if you'd like to start a discussion on any items from this list.
Deviations
The following is a list of deviations between Freeze and Llama:
Llama
.equalObjects
- Not implemented.
.Dictionary
.copy
- A temporary, deprecated compatibility layer exists. Use
table.cloneinstead.
.copyDeep
- Not implemented. Reconsider if you really need this.
.equals
Freeze.Dictionary.equalswill perform value-equality instead of reference-equality.Freeze.Dictionary.equalsonly accepts two objects to compare between instead of varags arguments
.equalsDeep
- Not implemented.
.fromLists
- Not implemented.
.map
Freeze.Dictionary.maprequires themapperargument to return two arguments forvalueandkey.
.mergeDeep
- Not implemented.
.removeKeys
- A temporary, deprecated compatibility layer exists. Use
Dictionary.removeinstead.
.removeValues
- A temporary, deprecated compatibility layer exists. Use
Dictionary.removeValueinstead.
.update
Freeze.Dictionary.updaterequires an updater function while Llama's was optional.Freeze.Dictionary.update's updater signature is(Value) -> (Value)instead of Llama's(Value, Key) -> (Value).Freeze.Dictionary.updatefinal argument isnotSetValueinstead of acallbackfunction.
-- Freeze
Freeze.Dictionary.update(dictionary, key, function(value)
return string.upper(value)
end, "default value")
-- Llama
Llama.Dictionary.update(dictionary, key, function(value, key)
return string.upper(value)
end, function(key)
return "default value"
end)
List
.concatDeep
- Not implemented.
.copy
- Not implemented. Consider
table.cloneinstead.
.copyDeep
- Not implemented. Reconsider if you really need this.
.create
- A temporary, deprecated compatibility layer exists. Consider
table.createinstead.
.equals
Freeze.List.equalswill perform value-equality instead of reference-equality.Freeze.List.equalsonly accepts two objects to compare between instead of varags arguments.
.equalsDeep
- Not implemented.
.find
Freeze.List.findaccepts a predicate instead of a value.Freeze.List.findreturns a value instead of index.- Consider
table.findif you want to use a static value.
-- Freeze
local value = Freeze.List.find(list, function(value)
return value == "foo"
end)
-- Llama
local index = Llama.List.find(list, "foo")
-- Luau
local index = table.find(list, "foo")
.findLast
- Not implemented.
.findWhere
- A temporary, deprecated compatibility layer exists. Please use
Freeze.List.find. - The
fromargument is not supported.
.findWhereLast
- A temporary, deprecated compatibility layer exists.
- The
fromargument is not supported.
.insert
Freeze.List.insertallows the providedindexargument to be out of bounds. Llama would throw in this case whereas Freeze will clamp the value to either the beginning or the end of the list.
.join
- A temporary, deprecated compatibility layer exists. Please use
Freeze.List.concat.
.removeIndices
- A temporary, deprecated compatibility layer exists. Please use
Freeze.List.remove.
.removeValues
- A temporary, deprecated compatibility layer exists. Please use
Freeze.List.removeValue.
.set
Freeze.List.setallows theindexargument to be out of bounds whereas Llama would throw.- If no changes are made,
Freeze.List.setwill return the original List.
.slice
Freeze.List.sliceallows theindexargument to be out of bounds. Will not throw.- Using a negative number will slice from the end of the list.
.splice
- Not implemented.
.toSet
- Not exposed yet.
.update
Freeze.List.updaterequires an updater function while Llama's was optional.Freeze.List.update's updater signature is(Value) -> (Value)instead of Llama's(Value, Key) -> (Value).Freeze.List.update's final argument isnotSetValueinstead of acallbackfunction.
-- Freeze
Freeze.List.update(list, key, function(value)
return string.upper(value)
end, "default value")
-- Llama
Llama.List.update(list, key, function(value, key)
return string.upper(value)
end, function(key)
return "default value"
end)
.zipAll
- Not implemented.
Set
- Not implemented yet.