We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
:def video:auto-fallback source:type(*, attr(src)) source:type(mp4, attr(src)) :implicit video { auto-fallback:on } video @src=sample.webm
The text was updated successfully, but these errors were encountered:
implicit macro能否用Jedi中的闭包完成?按照我猜的意思,这里自动给video标签加source的功能可以通过在闭包调用里加参数和条件判断完成。当然这样会需要多加参数会在书写上比较烦,如果闭包里能套闭包的话就能currying解决的话也可以。多引入一个implicit是否有必要呢?以及引入之后,implicit的作用域、implicit是否会引发可读性问题(如同一个标签在两个文件里表现完全不同等等)
Sorry, something went wrong.
目前类似auto fallback之类的转换要么是显式的写一个macro要么是hard code在编译的某个环节。这两个都不算好的方法。implicit确实有你说的问题,隐式的东西至少都有“可见性”的问题。但是本身auto fallback之类的需求就是希望一般开发者不要关心这个。你也可以看到例子里我加了个 :implicit 块来显式配置开启哪些宏,也是考虑到了可见性问题。
:implicit
当然这个issue只是记录一下我想到的问题,未必就是好的解决方案。
No branches or pull requests
The text was updated successfully, but these errors were encountered: