3

So some of the C++ guys I deal with have this thing in their mind that they know all the other languages cause they're similar right, and they argue that it doesn't work vice versa.You know Java, you don't know c++

Simple advice to people out there who meet such people is to just ask them to make a Java program with the goto command

Little know it all freaks.

Comments
  • 1
    Although going from C++ to Java is pretty straightforward as Java doesn't really add any complexity and is fairly similar to the OO parts of c++ (It simplifies a lot of things).

    Going from Java to C++ is a tiny bit harder since it adds complexity (mainly in regards to memory management as the other big differences between the two languages (i.e, template meta programming) can be ignored if one wishes)
  • 0
    @ItsNotMyFault if there's a difference, it goes both ways. Java is different from c++ is the same as c++ being different from Java. Even so, your points have been gladly noted
  • 2
    Drop some erlang on them and se how they cope :)

    Or F#, Ocaml or why not lisp. :p
  • 0
    @Voxera Sounds good however if you don't want them to ever come back you could throw in THE ASSEMBLY
  • 1
    @TheAnimatrix I actually think assembly has more in common with c++ than c++ has with say f#.

    Assembly is still statement based.

    True functional programing with immutable datastructures is so different that even though I wrote a space invader game in F# I still have a hard time reading most F#.

    There is just so many differences in how you think around a problem.
  • 0
    @Voxera this is the first I've heard of this language, looks interesting could you give me an idea of where this language excels.
  • 0
    @Voxera having trouble understanding why Microsoft would create F# when C# exists, is it a successor
  • 2
    @TheAnimatrix F# is microsofts version of Ocaml, a functional language like erlang and haskel.

    You usually dont use any if statements or loops but pattern matching and tail recursive functions.

    Variables are by default immutable which means that they are like scoped constants.

    You can assign exactly once, then they are read only.

    This makes it possible for the compiler to g bananas with parallel execution.

    Another feature is that most functions should be deterministic and side effect free. This mean that if you call the same function with the same arguments you get the same result and nothing else changes.

    The benefits if you do it right is easily testable code. Short easy to understand functions. Less bugs.

    Erlang was designed by Ericsson for their axe phone switches to handle thousands of parallel processes in real time.

    But search for functional programming, there is a ton of resources.
  • 1
    @TheAnimatrix Well they created C# when they already had visual basic to attract java and c programmers.

    F# was to hop on the growing trend of functional programming.

    But they are also slowly merging some functional concepts into C# like pattern matching.

    There is also immutables on the drawing board.
  • 0
    @Voxera Damn this thing is more like a challenge than a programming language, the language looks really interesting.. Gonna dive into it now, I've know about erlang in the sense that it was used for making whatsapp but nothing else.
  • 1
    @TheAnimatrix It is a functional language, They are very different (a program is written as a chain of functions rather than as a list of statements (as you would in imperative languages), you don't normally use things like loops or if statements but use recursion and pattern matching instead) they have some advantages since pure functions have no side effects making it easy to verify that the program is correct and to distribute the work across cores/cpus/servers.
Add Comment