Hooks for inserting specific types differently #55
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Right now all h-expression values are passed to
Std.string()but for Hankerchief and other Hank front-ends, it might make more sense to display different types differently. For example, if an h-expression returns a HaxeFlixel sprite, it might make sense to add the sprite to the world directly. This would enable devs to set up expressive syntax for things like sound effects and graphics, i.e.So I'm proposing an extensible hook system for h-expression outputs. A Map<Type, function> that is checked whenever something other than a string/int/etc. is produced.
Type safety re: #60 might be a gotcha for this feature.