Hacker News new | past | comments | ask | show | jobs | submit login

Zed, do you think you could have written Mongrel2 in C, whilst doing a good job, without having already had the experience with Mongrel v1? What I'm trying to get at is our we just seeing another example of scripting languages being good for prototyping, but getting better raw performance(memory footprint,/speed/disk usage) from a lower level language? Or do you think you could have ended up with a decent architecture on a first go?



I'm not Zed, but I have taken this approach several times (Primarily Ruby->Objective-C, but also Ruby->C). I often find it helpful to validate an idea in code quickly, and rewrite for speed/scalabilty/platform integration/etc once I'm happy with a design.


Yes, actually I do this all the time. While I think the total effort of a web server is about the same in most languages, an initial prototype is way easier in a language like Python or Ruby. That's mostly because there's much less ceremony involved and all the bits you need are right there.

As I work on the prototype though, I start to figure out if the language I decided at first will work well for it or not. Since I usually throw my first prototype out, with a fixed time to get it working, I'll end up picking a different language or not depending on my experience so far.


I'm not Zed either, but it's worth noting that you can usually do this without having to throw away the higher-level language entirely - most scripting languages have C APIs so that you can profile and move the expensive parts to C. Sometimes it's necessary to change the architecture of the entire project, but more localized changes are often good enough.

Lua and Tcl were designed with this approach in mind (they expect to be embedded), but you can do it with Python, Ruby, Lisp, Erlang, etc. too.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: