9 comments on “Java, C, C++, C#, Python Compared

  1. Alfonso J. Ramos

    // Java Streams are a response to C# Linq. So you could think of it as C#'s Stream, except it came first, plus it has custom language statements:

    using System;

    using System.Linq;

    var nums = Enumerable.Range(0, 10);

    var procecedNums = from n in nums where n % 3 == 0 orderby -n select n * 2;

    // var procecedNums = nums.Where(n => n % 3 == 0).OrderBy(n => -n).Select(n => n * 2); // this is equivalent to the above line

    foreach (var evenNum in procecedNums) Console.WriteLine(evenNum); // 18 12 6 0

    Reply
  2. nate sire

    I think of expressive as being able to accomplish different tasks in many different ways. In Ruby, everything is an object. That makes it flexible. Python. No. You are restricted to how you write code. Even JavaScript is more expressive than Python. But you can get in trouble because of the expressiveness. In Python…..there's normally one way to write code. Decorators 🙂

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *