News for hackers. Stuff that matters.
Re:Experience porting 4k lines of C code to go by markokocic on Wednesday June 22, 2011 @03:40AM (#2682155)
It's nice that Go offers some improvements over C, but is it enough?

Porting a program written in one of the "lowest level" languages still in use today to one of the newest "modern" languages which claims high level features and having only 20% code size reduction doesn't seem like a big win to me, especially if all the saving attribute to only one feature (better arrays).

Maybe it is just because it was port, and not a reimplementation in idiomatic Go style.

I would certainly like to see other solutions to the same problem written in idiomatic Go, Clojure, Haskell, C++ and Scala, just for the comparison.

Re:Experience porting 4k lines of C code to go by jlouis on Wednesday June 22, 2011 @08:29AM (#2682786)
Enough? It is rather the observation that if you use the same parsing approach, more or less, in a language which looks like C, then the possible improvement is rather small.

There are two things at work here: how small is the parser? And second, how fast is the parser? I know you can write some extremely fast highly idiomatic parsers in Haskell though. But I doubt they will be faster than hand coded C.