TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Macros: the Plan for Scala 3

132 点作者 ddispaltro大约 7 年前

3 条评论

jrq大约 7 年前
Disclaimer : I&#x27;m just some moron on the Internet<p>Unpopular opinion: I hate meta programming. We have composition, why do you need to mess with the nature of things? A long time ago, I was freelancing Rails. I can&#x27;t accurately describe the deflating feeling of tracing your problem back to some class that one person (a ruby guru warrior, no doubt) wrote, with a few dozen dynamic deeds or to_methods. It&#x27;s the most demotivating thing I&#x27;ve come across in real life code.<p>It&#x27;s worse somehow than complicated numeric code, because with the numbers, at least I know this shit works by the end of it. If I start writing good var names, I&#x27;ll probably even figure out how it works in an hour or two<p>That being said, I&#x27;m tentatively excited about Tasty. What a witty name by the way!<p>Having the extra type information should allow for much smarter transforms at the language level and I hope macros in scala 3 aren&#x27;t so much a mess.<p>Also, let&#x27;s just get rid of implicits, whaddaya say? ;-)<p>Anyways, proud of the scala 3 team this far. Even though they haven&#x27;t killed sbt yet, they&#x27;re putting their work in admirably to a difficult problem. I&#x27;d love to have that much meaning and purpose in my own work.<p>I didn&#x27;t have time to actually read spec, will do later, so if I said something inaccurate, let me know gently<p>Edit: macros will conform to black box and be constrained to their types, runs after type checking.<p>That&#x27;s awesome
评论 #16966307 未加载
评论 #16966682 未加载
评论 #16965976 未加载
评论 #16965898 未加载
评论 #16966741 未加载
netvl大约 7 年前
This post, as far as I can see, does not mention scala-meta-based macros (project called scalamacros I think) at all. What happened with this direction of macros development? Was it abandoned? Or is the new approach built on it?
评论 #16965615 未加载
评论 #16970947 未加载
Xuper大约 7 年前
Hopefully this will simplify Scala for newcomers and especially speed up onboarding when handing over codebases written by expert developers.