top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

In what ways Scala is better than other programming language?

+2 votes
274 views

how this language is better than other functional programming languages?

posted Jun 28, 2016 by Shivam Kumar Pandey

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

In Scala arrays uses regular generics but in other language generics are bolted on as an afterthought and are completely separate but have overlapping behaviors with arrays. Scala has immutable "val" as a first class language feature. The "val" of scala is similar to Java final variables. Contents may mutate but top reference is immutable. Scala lets 'if blocks', 'for-yield loops', and 'code' in braces to return a value. It is more preferable and eliminates the need for a separate ternary operator. Singleton has singleton objects rather than C++/Java/C# classic static. It is a cleaner solution Persistent immutable collections are the default and built into the standard library. It has native tuples and a concise code. Scala don't have any boiler plate code

a) The arrays uses regular generics, while in other language, generics are bolted on as an afterthought and are completely separate but have overlapping behaviours with arrays.

b) Scala has immutable “val” as a first class language feature. The “val” of scala is similar to Java final variables. Contents may mutate but top reference is immutable.

c) Scala lets ‘if blocks’, ‘for-yield loops’, and ‘code’ in braces to return a value. It is more preferable, and eliminates the need for a separate ternary operator.

d) Singleton has singleton objects rather than C++/Java/ C# classic static. It is a cleaner solution

e) Persistent immutable collections are the default and built into the standard library.

f) It has native tuples and a concise code

g) It has no boiler plate code

answer Jul 4, 2016 by Karthick.c
...