Conversation
|
I'm wondering if this is somewhere where we should depart from Teal. This syntax is a bit odd to me. I feel like it would be more useful to have a What do you think? I don't have strong feelings about this. It's just an observation. |
|
I'm not crazy about it either TBH. Ideally I think something like the following might be nicer but would need other considerations Where addr is a sort of alias for AVMType.bytes (+ extra processing) This would also be useful in the case of Where bigint is also an alias for AVMType.bytes (+ mapping fn calls like +/-/* to the bytemath equivalent) |
|
An explicit address type also makes it nicer for code legibility when we can do things like: |
Similar to hex looking for
0x...in #60, this looks foraddr(...)where the contents are valid b32 strings.This also changes the
constmap to allowUnion[ConstValue, Literal]whereLiteralis the AST Node type, this way we can use thewrite_tealdefined on the Literal itself (important forLiteralAddressto writeaddr ...)Note: this also includes the
LiteralHexchanges, so if that gets merged this will look cleanerMarked as draft for now until syntax is decided.