Mail Archives: geda-user/2015/07/07/17:55:01
On Tue, 2015-07-07 at 16:28 -0400, Dave McGuire (mcguire AT neurotica DOT com)
[via geda-user AT delorie DOT com] wrote:
> One can hope, but one never knows. But how does one decide which
> one
> to "get behind"? If you choose the wrong one, all the code you've
> written in it effectively becomes obsolete very quickly. It's not an
> easy problem to solve.
Porting clean DRY code is not that hard. The mentioned modern languages
are some sort of similar. That makes learning them easier, and porting
too. Even porting clean C code to modern languages is generally easy,
because C is generally a subset of modern languages. (There are
exceptions, my feeling is that Crystal and Julia do not support things
like bit operations very well.) The problem is all the garbage code. If
I remember correctly, KiCad has one million lines of C++ code. Why that
large? I guess all the kids have always added without much thinking,
being proud: I have 1000 lines of code in KiCad?
For porting my 6k lines of Ruby Peted code to Nim I am still unsure how
long it may take, 400+-100 hours is my current guess. Porting Python is
more easy.
>
> I have, with Perl, Java, and C++. C is consistently the fastest and
> has the smallest memory footprint.
>
> People often seem to forget the fact that programming in
> higher-level
> languages usually involves importing huge blocks of code as binary
> blobs
> over which they have no control, either of what's included and what's
> omitted, or what's executed and what isn't.
Memory footprint is important indeed. For Nim it is very low, similar to
C. I think for Rust too. For Crystal I am not sure, for Go large
executable size is indeed a known problem.
With the bloob: Yes, buggy bytecode interpreters can be a problem. That
is for Ruby, with Ruby 2.2 I have some random GC related crashes
currently. But for the other languages there are no blobs.
C++ and Rust suffer from long compiling time unfortunately. Here Nim and
Crystal are much better. I think the Nim compiler has 100k lines of code
only, and compiles itself in a few seconds!
- Raw text -