scala_functional_programming_fundamentals

Scala Functional Programming Fundamentals

Return to Scala FP, Java Functional Programming Fundamentals, Kotlin Functional Programming Fundamentals, Clojure Functional Programming Fundamentals, Functional Programming Fundamentals, Python Functional Programming Fundamentals, Functional Programming and Concurrency, Functional Programming, FP, Parallel Programming, Parallelism, Asynchronous Programming, Asynchrony, Concurrency, Fundamentals, Programming Fundamentals, Awesome Functional

Snippet from Wikipedia: Functional programming

In computer science, functional programming is a programming paradigm where programs are constructed by applying and composing functions. It is a declarative programming paradigm in which function definitions are trees of expressions that map values to other values, rather than a sequence of imperative statements which update the running state of the program.

In functional programming, functions are treated as first-class citizens, meaning that they can be bound to names (including local identifiers), passed as arguments, and returned from other functions, just as any other data type can. This allows programs to be written in a declarative and composable style, where small functions are combined in a modular manner.

Functional programming is sometimes treated as synonymous with purely functional programming, a subset of functional programming which treats all functions as deterministic mathematical functions, or pure functions. When a pure function is called with some given arguments, it will always return the same result, and cannot be affected by any mutable state or other side effects. This is in contrast with impure procedures, common in imperative programming, which can have side effects (such as modifying the program's state or taking input from a user). Proponents of purely functional programming claim that by restricting side effects, programs can have fewer bugs, be easier to debug and test, and be more suited to formal verification.

Functional programming has its roots in academia, evolving from the lambda calculus, a formal system of computation based only on functions. Functional programming has historically been less popular than imperative programming, but many functional languages are seeing use today in industry and education, including Common Lisp, Scheme, Clojure, Wolfram Language, Racket, Erlang, Elixir, OCaml, Haskell, and F#. Lean is a functional programming language commonly used for verifying mathematical theorems. Functional programming is also key to some languages that have found success in specific domains, like JavaScript in the Web, R in statistics, J, K and Q in financial analysis, and XQuery/XSLT for XML. Domain-specific declarative languages like SQL and Lex/Yacc use some elements of functional programming, such as not allowing mutable values. In addition, many other programming languages support programming in a functional style or have implemented features from functional programming, such as C++11, C#, Kotlin, Perl, PHP, Python, Go, Rust, Raku, Scala, and Java (since Java 8).

Snippet from Wikipedia: Scala (programming language)

Scala ( SKAH-lah) is a strong statically typed high-level general-purpose programming language that supports both object-oriented programming and functional programming. Designed to be concise, many of Scala's design decisions are intended to address criticisms of Java.

Scala source code can be compiled to Java bytecode and run on a Java virtual machine (JVM). Scala can also be compiled to JavaScript to run in a browser, or directly to a native executable. On the JVM Scala provides language interoperability with Java so that libraries written in either language may be referenced directly in Scala or Java code. Like Java, Scala is object-oriented, and uses a syntax termed curly-brace which is similar to the language C. Since Scala 3, there is also an option to use the off-side rule (indenting) to structure blocks, and its use is advised. Martin Odersky has said that this turned out to be the most productive change introduced in Scala 3.

Unlike Java, Scala has many features of functional programming languages (like Scheme, Standard ML, and Haskell), including currying, immutability, lazy evaluation, and pattern matching. It also has an advanced type system supporting algebraic data types, covariance and contravariance, higher-order types (but not higher-rank types), anonymous types, operator overloading, optional parameters, named parameters, raw strings, and an experimental exception-only version of algebraic effects that can be seen as a more powerful version of Java's checked exceptions.

The name Scala is a portmanteau of scalable and language, signifying that it is designed to grow with the demands of its users.

Functional Programming: Functional Programming Compare and Contrast 10 Languages by Cloud Monk (December 2024)

Purely Functional Languages, Purely Functional Programming Languages (Haskell, Elm, PureScript, Agda, Idris, Coq, Lean, Miranda, Erlang, F#)

Popular Functional Programming Languages (Haskell, Scala, Clojure, F#, Erlang, Elm, OCaml, Elixir, Racket, PureScript, Lisp, Scheme, Common Lisp, Rust, Swift, Java, Kotlin, TypeScript, JavaScript, Python, Ruby)

FP, Functional Clojure, Functional Haskell, Functional Erlang, Functional Elixir, Functional F#. Data Oriented Programming, Functional C++, Functional C#, Functional Java, Functional Kotlin, Functional Scala, Functional Go, Functional Rust, Functional JavaScript (Functional React), Functional TypeScript (Functional Angular), Functional Swift; Lisp, FP (programming language), Functional Programming Bibliography - Manning's Programming Functional in, Functional Programming Glossary, Awesome Functional Programming, Functional Programming Topics, Concurrency. (navbar_functional - see also , navbar_python_functional, navbar_django_functional, navbar_flask_functional, navbar_javascript_functional, navbar_typescript_functional, navbar_react_functional, navbar_angular_functional, navbar_vue_functional, navbar_java_functional, navbar_kotlin_functional, navbar_spring_functional, navbar_scala_functional, navbar_clojure_functional, navbar_csharp_functional, navbar_dotnet_functional, navbar_fsharp_functional, navbar_haskell_functional, navbar_rust_functional, navbar_cpp_functional, navbar_swift_functional, navbar_elixir_functional, navbar_erlang_functional, navbar_functional, navbar_functional_reactive)

Scala: Scala Fundamentals, Scala 3, Scala 2, SBT-Maven-Gradle, JVM, Scala Keywords, Scala Built-In Data Types, Scala Data Structures - Scala Algorithms, Scala Syntax, Scala OOP - Scala Design Patterns, Scala Installation (Scala 3 on Windows, Scala 3 on Linux, Scala 3 on macOS), Scala Containerization, Scala Configuration, Scala IDEs (JetBrains IntelliJ), Scala Linter, Scala on JVM, Scala Development Tools, Scala Compiler, Scala Transpiler (Scala.js, Scala Native), Scala REPL, Scala Testing (ScalaTest, ScalaCheck, JUnit, Hamcrest, Mockito, Selenium, TestNG), Scala Data Science - Scala DataOps, Scala Machine Learning - Scala MLOps, Scala Deep Learning, Functional Scala, Scala Concurrency - Scala Parallel Programming, Scala Libraries (Akka Toolkit), Scala Frameworks (Play Framework, Scalatra), Scala History, Scala Bibliography, Manning Scala Series, Scala Courses, Scala Glossary, Scala Topics, Scala Research, Scala GitHub, Written in Scala (Apache Spark, Apache Kafka, Apache Helix), Scala Popularity, Scala Awesome. (navbar_scala - see also navbar_scala_standard_library, navbar_scala_libraries, navbar_scala_reserved_words, navbar_scala_functional, navbar_scala_concurrency)


© 1994 - 2024 Cloud Monk Losang Jinpa or Fair Use. Disclaimers

SYI LU SENG E MU CHYWE YE. NAN. WEI LA YE. WEI LA YE. SA WA HE.


scala_functional_programming_fundamentals.txt · Last modified: 2024/04/28 03:42 by 127.0.0.1