Learn A New Language

May 31, 2016

It’s fun to learn new programming languages. It’s also useful, even if you never use the new language, because it forces you to think differently about how you do things.

Your task is to write a familiar program in an unfamiliar language. When you are finished, you are welcome to read or run ([1], [2]) a suggested solution, or to post your own solution or discuss the exercise in the comments below.


Pages: 1 2

3 Responses to “Learn A New Language”

  1. Dr. Z. said

    Go, really? The only reason this language hasn’t fallen into oblivion is that it has Google behind it. If it were to compete in fair terms with other languages today, it is bound to fail to make the cut.

    Here is the equivalent code for factoring an integer in Julia:
    As for the primes:

    Note that it doesn’t need to import any libraries either, while its performance is comparable to C. So, if you want to learn a new language, do yourself a favor and learn something useful.

    Also, since when is 170296465834288046421517 a big Int? Is Go’s memory management so feeble that it can’t handle a 78 bit integer?

  2. Jussi Piitulainen said

    Dr. Z., there is no call for such rudeness.

    Incidentally, Julia developers have moved these functions out of Base. Need to be imported, they will.

  3. programmingpraxis said

    Thanks for the defense, Jussi. I generally ignore folks like him. If he does it again, he will be banned.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: