Comparing the Same Project in Rust, Haskell, C++, Python, Scala and OCaml
41–50 of 384 posts
Re: Comparing the Same Project in Rust, Haskell, C++, Python, Scala and OCaml
#42Earlier quoted context omitted.
Sure, and you can put the else on the same line as the end of the if block even without doing that. Or you could make the difference bigger by putting the opening brace on a newline. I wrote the style of C that I actually write, but it's probably not fair for me to label it as a property of just the language.
I think it’s a fair point to bring up given that many people actually do write their code that way.
Re: Comparing the Same Project in Rust, Haskell, C++, Python, Scala and OCaml
#43> I think the smaller differences are also large enough to rule out extraordinary claims, like the ones I’ve read that say writing a compiler in Haskell takes less than half the code of C++ by virtue of the language Specifically the "by virtue of the language" part: Seems to me like it's unreasonable to claim the languages are on equal footing because fancy parser libraries aren't allowed to be used for the project.…
Re: Comparing the Same Project in Rust, Haskell, C++, Python, Scala and OCaml
#44I find it curious that both the team that used C++, and the author, both appear to believe that sum types and related facilities are not usable or conveniently expressible in C++. I got that Boost Spirit, a powerful parsing library, was forbidden. Were all the Boost libraries similarly embargoed?
I regularly use Boost Spirit as an example of "sounds good but actually a nightmare", and am always surprised to see it mentioned in the wild. It is truly a modern horror.
Boost is like Apache -- a collection of libraries of various quality and stage of development, not all alike. A lot of stuff in there is designed to prove out experimental language features ahead of the next standard revision. A lot of that stuff is convenient, but a complexity nightmare under the hood.
For your own sanity, and of those you care about, don't accept all of Boost equally. Be suspicious, and treat each package as if it were some random library you found on the internet.
(There are of course tons of great things in Boost, but tread carefully)
Re: Comparing the Same Project in Rust, Haskell, C++, Python, Scala and OCaml
#45I'm sad that no one wrote it in the subset of Java that it was going to compile.
Re: Comparing the Same Project in Rust, Haskell, C++, Python, Scala and OCaml
#46Loved this part and thought it was hysterical - > Since my team had all interned at Jane Street the other language we considered using was OCaml, we decided on Rust but I was curious about how OCaml might have turned out so I talked to someone else I knew had interned at Jane Street and they indeed did their compiler in OCaml with two other former Jane Street interns. Relatedly this is why I get annoyed at people tha…
He was a lead programmer, who issued two-week assignments to other engineers; if one wasn't done come Friday, he would do it himself on Saturday.
He doesn't consider himself especially fast, because he knows someone else who codes ten times as fast, and wears out two keyboards per year.
This project was also interesting because they took blood samples, by which they got objective measurements of stress. Everyone's stress level increased right up to the deadline -- except his. And their stress levels did not start falling until many months after.
Re: Comparing the Same Project in Rust, Haskell, C++, Python, Scala and OCaml
#47If you're into this sort of thing, definitely check out the ICFP Programming Contest -- take next Friday off and join in on the fun! https://icfpcontest2019.github.io/
> Any programming language(s) on any platform(s) may be used. How does this work? What’s stopping me from using some hyperpowered esolang I cooked up for the competition?
Re: Comparing the Same Project in Rust, Haskell, C++, Python, Scala and OCaml
#48I haven't made it through the whole thing yet, but I do want to register a vote in favor of using Lines Of Code count as a rough measure of program complexity. I think it's a perfectly valid things to do, provided that it isn't used as an evaluation metric and nobody is gaming it, and everyone is a reasonably good programmer, not doing crazy things like trying to stuff a massive algorithm onto one line to be clever,…
Re: Comparing the Same Project in Rust, Haskell, C++, Python, Scala and OCaml
#49> I think the smaller differences are also large enough to rule out extraordinary claims, like the ones I’ve read that say writing a compiler in Haskell takes less than half the code of C++ by virtue of the language Specifically the "by virtue of the language" part: Seems to me like it's unreasonable to claim the languages are on equal footing because fancy parser libraries aren't allowed to be used for the project.…
Re: Comparing the Same Project in Rust, Haskell, C++, Python, Scala and OCaml
#50Excellently written, great topic, and done w/o flaming/too much bias. I'm amazed as many older folks in the industry would not be able to have this level of content and maturity to write an informative article.
For example, my early Fortran programs looked like Basic. My early C programs looked like Fortran. My early C++ programs looked like C. And my early D code looked like C++.
It takes much more than being able to write a program in X to be able to write one that makes proper use of the language.