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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

An educational tower of programming language features

3 点作者 mohamedsa大约 13 年前

2 条评论

1331大约 13 年前
The Racket (<a href="http://racket-lang.org/" rel="nofollow">http://racket-lang.org/</a>) dialect of Scheme also provides different levels of a programming language with features of increasing complexity, for educational purposes. In the current version, there are five levels to be used while working through _How To Design Programs_ (<a href="http://www.htdp.org/" rel="nofollow">http://www.htdp.org/</a>). This book is geared toward adults, but Scheme/Racket is also a great language for teaching children (<a href="http://www.bootstrapworld.org/" rel="nofollow">http://www.bootstrapworld.org/</a>). Perhaps this can provide some inspiration for your project.
评论 #3898587 未加载
ZeroGravitas大约 13 年前
Very interesting idea.<p>I'm not sure about the goto though (despite/because of it being something I learned as a child).<p>When I used goto it was in the form goto <i>linenumber</i>, but if you're having to create explicit labels to jump to, it would seem easier (to me) to give those labels some explicit structure as loops or functions which doesn't need to be explained at first (they can just act like goto labels) but can be built on later.<p>e.g. the classic:<p><pre><code> 10 print "name" 20 goto 10 </code></pre> in this scheme becomes<p><pre><code> label start print "name" goto start </code></pre> so why not<p><pre><code> loop print name restart loop </code></pre> and then later the label <i>loop</i> could become <i>loop while</i> or <i>loop until</i> or <i>loop with item from list</i>. "restart" makes sense both at the end of a loop and if you wish to continue with the next iteration after a test. Using goto to break out of a loop could be <i>exit loop</i> or <i>continue after loop</i>.<p>I'm not sure what other uses of "goto" you'd expect at this level beyond restarting or exiting loops. If/then seems to take care of simple code branching until you get to procedures.
评论 #3899097 未加载