Comparing the Same Project in Rust, Haskell, C++, Python, Scala and OCaml
1–10 of 384 posts
Re: Comparing the Same Project in Rust, Haskell, C++, Python, Scala and OCaml
#2Re: Comparing the Same Project in Rust, Haskell, C++, Python, Scala and OCaml
#3Re: Comparing the Same Project in Rust, Haskell, C++, Python, Scala and OCaml
#4Re: Comparing the Same Project in Rust, Haskell, C++, Python, Scala and OCaml
#5Love reading your posts Tristan, a question about the choice of Rust. Was it specifically based on the previous experience you and your groupmates drew on or were these languages assigned to students? Was there any point in time where you and your team were trying to optimize your compiler?
Re: Comparing the Same Project in Rust, Haskell, C++, Python, Scala and OCaml
#6I wonder how Racket would compare. I’ve written some DSLs at an old job for Racket and found the libraries for language design almost unreasonably powerful (and maybe unreasonably complicated as well). The dynamic typing would also help in reducing the amount of code.
Re: Comparing the Same Project in Rust, Haskell, C++, Python, Scala and OCaml
#7I had a similar experience in university. Class had to implement a modified Turing machine. We could use whatever language we wanted. On person did it in C++ and it was several hundred lines. Another in Java which was slightly smaller. I implemented mine in Python and it was small enough to print on a single piece of paper. I think it was something like 30 lines or so. I exploited break statements to make it terse but readable. It did mean I was marked down a bit for them but it was by far the shortest program in the class.
Re: Comparing the Same Project in Rust, Haskell, C++, Python, Scala and OCaml
#8I really wish when counting code that people would use one of the more modern code counters, or at least use cloc. Tokei, loc, scc, polyglot, loccount or gocloc give a much better idea over wc because they account for comments and blank lines and in the case of scc and tokei strings. I had a similar experience in university. Class had to implement a modified Turing machine. We could use whatever language we wanted. O…
I ended up using raw lines for comparison because for relative measurement it didn't matter for the above reason, and I knew everyone had the same `wc` and I could get them to send me the output of the `wc {glob}` version that lists lines and bytes of all files so that I could drill down into which parts were different.
Re: Comparing the Same Project in Rust, Haskell, C++, Python, Scala and OCaml
#9Re: Comparing the Same Project in Rust, Haskell, C++, Python, Scala and OCaml
#10I'm sad that no one wrote it in the subset of Java that it was going to compile.