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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

DSL processing in Scala

40 点作者 dpapathanasiou将近 10 年前

7 条评论

dpapathanasiou将近 10 年前
I&#x27;m still a scala newbie, so any comments&#x2F;suggestions are appreciated.<p>The full source code is here: <a href="https:&#x2F;&#x2F;gist.github.com&#x2F;dpapathanasiou&#x2F;b9d85685a0381f1deea0" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;dpapathanasiou&#x2F;b9d85685a0381f1deea0</a>
评论 #9954468 未加载
rco8786将近 10 年前
You should check out the Parser package in the scala standard lib. I maintain a few DSLs using this and it&#x27;s an absolute dream.<p><a href="https:&#x2F;&#x2F;wiki.scala-lang.org&#x2F;display&#x2F;SW&#x2F;Parser+Combinators--Getting+Started" rel="nofollow">https:&#x2F;&#x2F;wiki.scala-lang.org&#x2F;display&#x2F;SW&#x2F;Parser+Combinators--G...</a><p>Code looks solid otherwise...at least where I work the style would be to favor functional idioms over for loops but I think that&#x27;s just personal preference.
评论 #9954001 未加载
评论 #9953719 未加载
sklogic将近 10 年前
Just for fun and to illustrate what&#x27;s in my opinion is wrong with Scala approach to DSLs, implemented the same DSL using a specialised meta-language: <a href="http:&#x2F;&#x2F;bit.ly&#x2F;1U2PGlV" rel="nofollow">http:&#x2F;&#x2F;bit.ly&#x2F;1U2PGlV</a><p>The meta-language is available here: <a href="https:&#x2F;&#x2F;github.com&#x2F;combinatorylogic&#x2F;mbase" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;combinatorylogic&#x2F;mbase</a>
tlarkworthy将近 10 年前
For DSL implementation see string interpolation, <a href="http:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;10708136&#x2F;how-to-create-dsl-in-scala-for-command-lines-with-minimum-extra-boilerplate" rel="nofollow">http:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;10708136&#x2F;how-to-create-ds...</a>
birdsbolt将近 10 年前
This doesn&#x27;t seem to solve the puzzle. As much as DSL processing part is done, the whole point of the puzzle was to make the operations sublinear in time complexity.
anon3_将近 10 年前
To anyone here who works on a large, scala codebase as a team: how do you manage compilation times and narrowing code standards to a manageable set of idioms?
评论 #9953074 未加载
评论 #9953717 未加载
_pmf_将近 10 年前
Yuck. No wonder Lispers look down on us.