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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Factor VM ported to C++

20 点作者 visitor4rmindia大约 16 年前

2 条评论

gcv大约 16 年前
About 18 months ago, I ported a project I was working on from C to C++. I, too, wanted a few C++ features to simplify life, mainly to use the STL, but also for inheritance in a handful of places. I got what I wanted, but I have since concluded that switch to C++ was, on the whole, a mistake.<p>First, don't discount the longer compilation times. After learning Lisp, I became rather addicted to the rapid turn-around time of compiling code at the level of individual functions. I can tolerate C because, with a relatively clean build setup, it compiles quickly. g++ on my project is between 10 and 20 times slower than gcc. This means that, as I make minor changes, I'm more likely to have to wait a while for a build to finish. This means I'm more likely to slack off in between builds. This kills (my) productivity horribly.<p>Second, auxiliary tool support on Unix leaves a lot to be desired. I sprinkle my code with templates in places where they promote readability, and I use STL containers. gdb, at least the version I'm using, does not support displaying data in STL containers. This means that when I have to track down a problem with data in a map, gdb can't help me. I have run into nasty problems for which I had to write custom print-this-templated-structure-to-log code. In addition, g++ error messages which involve templates absolutely suck. Luckily, I can quickly figure out what I need to change just by looking at the affected line.<p>After thinking through these issues, I concluded that C++ wasted more of my time than it saved. YMMV, of course.
评论 #600818 未加载
评论 #600983 未加载
SwellJoe大约 16 年前
So Factor is not at all what I thought it was. I thought it was roughly a modern Forth for the JVM...and I thought the point of it was at least partially the JVM. Not dependence, but the ability to <i>use</i> Java libraries. The realization that this is not at all the case makes Factor seem more interesting but less useful, to me.
评论 #600781 未加载
评论 #600731 未加载