Together with C#, F# will be incorporating nullability as a concept for .NET reference types. From the F# perspective, this fits with the default non-nullness of other F# types. But compatibility with existing code makes designing this a wild ride!
This document discusses the SOLID principles of object-oriented programming and agile design. It defines each principle: single responsibility, open/closed, Liskov substitution, interface segregation, and dependency inversion. For each principle, it provides an example of how to apply the principle to code through refactoring existing code. It also discusses object-oriented concepts like polymorphism that relate to the SOLID principles.
Introduction to Scala Implicits, Pimp my library and TypeclassesJordi Pradel
An introduction to Scala implicits and the patterns they make possible, focusing on Pimp my library and type classes.
# Usage
- Clone the repo https://github.com/agile-jordi/scalabcn-implicits-2015
- When a slide "let's code!" is found, check out the commit corresponding to its first Step, and each consecutive step after that
- e.g. At slide 4 (let's code (Steps 1-3)), check out Step 1, read the code, then Step 2 and then Step 3. Then continue to slide 4.
The document discusses encapsulation in object-oriented programming. It defines encapsulation as hiding implementation details rather than just data hiding. True encapsulation hides things like derived classes, design details, and instantiation rules. Well-encapsulated code has high cohesion and low coupling between modules. The document warns against tight coupling through global variables and dependencies on member identities. It advocates hiding types, designs, and variations behind interfaces to achieve loose coupling and flexibility.
[4DEV] Bartosz Sokół - Functional developer in object oriented world - how F#...PROIDEA
Object-oriented programming languages have been here for decades, helping millions of developers to deliver (sort of) working software. Still, after many years, we still struggle with things like nulls and exceptions, which make our applications crash in most unexpected ways. So I have taken a challenge - can you use object-oriented language (C#) and write code in a way that those issues are almost gone? I will show how to leverage lessons learned from functional programming to make our applications more bulletproof - and fun to write as well!
The document provides an overview of several common programming paradigms, including imperative, functional, logic, object-oriented, and concurrent/distributed programming. For each paradigm, it gives a brief 1-2 sentence description of its characteristics. Imperative programming is described as evolving from machine and assembly language and focusing on non-programming contexts. Functional programming is defined as expression-oriented and close to mathematical specifications. Logic programming is summarized as using logical statements to describe required solution properties. Object-oriented programming views data as objects and has programmers define data types and operations. Concurrent and distributed programming allows for multiple simultaneous operations.
The document discusses the need for an executable version of the Unified Modeling Language (UML) called xUML. It notes that while UML 1.x describes system behavior, it is not fully executable because it lacks precise semantics for actions. xUML addresses this by defining a precise action semantics language and process to allow UML models to be executed, validated, and automatically generated into code. An executable UML provides benefits like early verification of requirements, improved quality through objective criteria, and more fun for analysts.
The document summarizes new language features in C# 3.0 and VB 9.0, including type inference, implicit typing, automatic properties, object and collection initializers, anonymous types, partial methods, nullable types, relaxed delegates, iterators, extension methods, lambda expressions, LINQ, and expression trees. Key enhancements are implicit typing with var, simplified property declaration with automatic properties, initialization of objects and collections, and anonymous types for inline objects.
The document discusses different types of Swift functions including functions with single or multiple parameters, functions with default or variadic parameters, functions with optional or multiple return types, and nested functions. Parameter names can be external, internal, or internal only depending on whether the function is an initializer or regular function. The document provides information on Swift functions and their various capabilities.
This document discusses the SOLID principles of object-oriented programming and agile design. It defines each principle: single responsibility, open/closed, Liskov substitution, interface segregation, and dependency inversion. For each principle, it provides an example of how to apply the principle to code through refactoring existing code. It also discusses object-oriented concepts like polymorphism that relate to the SOLID principles.
Introduction to Scala Implicits, Pimp my library and TypeclassesJordi Pradel
An introduction to Scala implicits and the patterns they make possible, focusing on Pimp my library and type classes.
# Usage
- Clone the repo https://github.com/agile-jordi/scalabcn-implicits-2015
- When a slide "let's code!" is found, check out the commit corresponding to its first Step, and each consecutive step after that
- e.g. At slide 4 (let's code (Steps 1-3)), check out Step 1, read the code, then Step 2 and then Step 3. Then continue to slide 4.
The document discusses encapsulation in object-oriented programming. It defines encapsulation as hiding implementation details rather than just data hiding. True encapsulation hides things like derived classes, design details, and instantiation rules. Well-encapsulated code has high cohesion and low coupling between modules. The document warns against tight coupling through global variables and dependencies on member identities. It advocates hiding types, designs, and variations behind interfaces to achieve loose coupling and flexibility.
[4DEV] Bartosz Sokół - Functional developer in object oriented world - how F#...PROIDEA
Object-oriented programming languages have been here for decades, helping millions of developers to deliver (sort of) working software. Still, after many years, we still struggle with things like nulls and exceptions, which make our applications crash in most unexpected ways. So I have taken a challenge - can you use object-oriented language (C#) and write code in a way that those issues are almost gone? I will show how to leverage lessons learned from functional programming to make our applications more bulletproof - and fun to write as well!
The document provides an overview of several common programming paradigms, including imperative, functional, logic, object-oriented, and concurrent/distributed programming. For each paradigm, it gives a brief 1-2 sentence description of its characteristics. Imperative programming is described as evolving from machine and assembly language and focusing on non-programming contexts. Functional programming is defined as expression-oriented and close to mathematical specifications. Logic programming is summarized as using logical statements to describe required solution properties. Object-oriented programming views data as objects and has programmers define data types and operations. Concurrent and distributed programming allows for multiple simultaneous operations.
The document discusses the need for an executable version of the Unified Modeling Language (UML) called xUML. It notes that while UML 1.x describes system behavior, it is not fully executable because it lacks precise semantics for actions. xUML addresses this by defining a precise action semantics language and process to allow UML models to be executed, validated, and automatically generated into code. An executable UML provides benefits like early verification of requirements, improved quality through objective criteria, and more fun for analysts.
The document summarizes new language features in C# 3.0 and VB 9.0, including type inference, implicit typing, automatic properties, object and collection initializers, anonymous types, partial methods, nullable types, relaxed delegates, iterators, extension methods, lambda expressions, LINQ, and expression trees. Key enhancements are implicit typing with var, simplified property declaration with automatic properties, initialization of objects and collections, and anonymous types for inline objects.
The document discusses different types of Swift functions including functions with single or multiple parameters, functions with default or variadic parameters, functions with optional or multiple return types, and nested functions. Parameter names can be external, internal, or internal only depending on whether the function is an initializer or regular function. The document provides information on Swift functions and their various capabilities.
The document discusses design patterns, which are common solutions to recurring problems in software design. It provides examples of some common design patterns like factory pattern, abstract factory pattern, builder pattern, and prototype pattern. It also discusses categories of design patterns like creational, structural and behavioral patterns.
Many occasion students are wondering which one should they choose in coding and why .In most cases, we want to avoid inheritance. We should use abstract classes only when we want to include functionality, but parts of the class's purpose need to be implemented by the child class.With abstract classes, you are forcing other developers to implement child classes using inheritance. Interfaces are much easier to add to existing classes, and with defender methods there is little reason to not consider interfaces first.
Hack in the Box GSEC 2016 - Reverse Engineering Swift Applicationseightbit
Swift apps present some challenges for reverse engineering compared to Objective-C apps. The main challenges are that Swift is less dynamic and there is limited tooling available. To analyze Swift apps, one can disassemble the binary and demangle Swift function names using the swift-demangle utility. For apps with Objective-C code as well, the class-dump tool can provide some class information. Runtime inspection using debuggers is also possible but less straightforward than with Objective-C. Overall, while more difficult, many typical reverse engineering tasks can still be performed on Swift apps.
The modern view on implementation of classic design patterns in JavaMikalai Alimenkou
Almost every developer heard about design patterns. They was introduced long time ago to solve particular set of repeating problems in systems of different complexity level and size. But there is an opinion that many design patters just filled holes in the OOP languages of that time. Java as one of them has transformed and improved significantly in the last 10 years. So may be we could review design patterns implementation in modern Java world? Some of them are now may be easily replaced with language idioms, some others may be covered with existing libraries and frameworks. I'm sure you know some design patterns that are dead now or became anti-patterns in their initial implementation. Lets make this fun and useful review together!
C# is a programming language that was created for use with the .NET platform, allowing access to libraries for Windows development (1). C# code consists of human-readable source code written in a text editor (2). The document then discusses some key elements of C# including statements, variables and assignment, types, strings, and whitespace (3).
The document discusses object-oriented programming concepts like classes, objects, methods, properties, inheritance, and polymorphism. It provides examples of different OOP concepts in C# like class definitions, object creation, method overloading, and inheritance hierarchies. The key topics covered include defining classes with data members and methods, creating objects from classes, using inheritance to extend classes, and implementing polymorphism through method overloading and overriding.
This document discusses type checking and type inference rules implemented in a TypeSystem aspect. It contains:
1) Rules that implement semantic error detection by checking conditions and reporting errors/warnings.
2) Inference rules that calculate the types of nodes based on concepts and patterns, such as setting the type of integer nodes to int and string nodes to string.
3) Rules establishing restrictions on the type of assigned values being subtypes of assignees.
4) The concept of a UserField that sets the type of user fields to the name of the entity type. Separate type checking must be implemented for user fields.
Design patterns are reusable solutions to common programming problems. The Gang of Four (GoF) authored the seminal book on design patterns, identifying 23 patterns divided into creational, structural and behavioral categories. Creational patterns provide object creation mechanisms, structural patterns manage object relationships, and behavioral patterns define communication between objects. Design patterns can be further divided into class and object patterns based on whether relationships are defined at compile-time or run-time.
Design Principle and Design Pattern examples on C# .NET Core.
(Note: Not all the contents are original, I copied some of them from online tutorials while learning and found great explanations. A great thanks to all for this information.)
Xtext is an open-source framework for developing programming languages and domain-specific languages. It generates parsers and abstract syntax trees from language grammars. It provides an Eclipse-based IDE with features like syntax highlighting, code completion, navigation, and refactoring support. A tutorial document outlines how to create a new Xtext project and write a sample grammar for a "Language of Entities" DSL. The grammar defines entity and field rules with terminals like ID and INT, and supports optional, repetitive, and alternative elements.
This document provides information about taxonomic keys, which are tools used in taxonomy to identify unknown organisms. It defines taxonomic keys and their purpose of using diagnostic characteristics to lead to the identification of a species or genus. It then describes different types of single access keys, including dichotomous, bracket, indented, serial, and grouped keys. It also discusses multi-access keys and styles of presenting keys, as well as advantages and disadvantages of using taxonomic keys.
This document discusses different types of taxonomic keys that can be used to identify biological entities like plants, animals, and microorganisms. Taxonomic keys present the user with a series of choices about characteristics that ultimately lead to the identification of an unknown specimen. The main types discussed are indented keys, simple bracket keys, simple non-bracket keys, pictorial keys, box-type keys, circular keys, and branching keys. Each key type has advantages and disadvantages depending on the group being identified and whether it will be used by specialists or non-specialists like field workers.
The document describes aspects of creating and defining a domain-specific language in MPS, including defining concepts, structure, editors, and relationships between concepts. Key concepts include Entity, Field, and Statement. Concepts can be abstract, extended by subconcepts, and implemented as interfaces. Editors are defined for concepts. The language is played with and compiled in a sandbox solution.
This document discusses different types of errors in programming:
1. It covers syntax errors, runtime errors, logic errors, incorrect operator precedence errors, and threading errors as sources of errors.
2. It provides examples of each type of error, such as division by zero for runtime errors and wrong scoping of variables for logic errors.
3. The document concludes with asking readers to discuss common errors they have encountered and providing a short quiz question about error types.
Projectional editing is an approach where the user directly edits an abstract syntax tree (AST) representation of code rather than text. The editor mimics a text editor to some extent by allowing the user to see and edit placeholders that represent the AST, though the user is actually editing the AST directly rather than text. This approach allows languages to evolve more easily than with text-based parsing since the AST structure is unambiguously defined, and it also allows languages to be more easily combined by defining a common set of node types.
This presentation explores the benefits of functional programming, especially with respect to reliability. It presents a sample of types that allow many program invariants to be enforced by compilers. We also discuss the industrial adoption of functional programming, and conclude with a live coding demo in Scala.
A slide about Pragmatic Approaches, such as, Evils of Duplication, Orthogonality, Reversibility, Tracer Bullets, Prototypes and Post-it Notes, Domain Languages and Estimating.
Source : A Pragmatic Programmer, written by Andrew Hunt and David Thomas.
This document discusses functional programming. It begins by stating that functional programming popularity has increased, with languages like F#, Haskell, Scala, Erlang and Elixir gaining popularity. Even OOP languages like C# and Java have incorporated some functional features. The document then covers key concepts of functional programming like pure functions, immutability, higher order functions and referential transparency. It discusses how C# supports a multi-paradigm approach, combining functional programming with imperative programming. Finally, it notes that functional programming is trending due to benefits for concurrency and parallel processing.
The document provides an overview of Python's typing module introduced in Python 3.5. It discusses the benefits of type hinting, including better documentation, finding bugs, and standardization. It demonstrates applying type hints to a simple function and running a type checker. Tips are provided for gradually adding type hints to improve code quality without changing functionality.
This document discusses the SOLID principles of object-oriented design. It introduces each principle - Single Responsibility Principle, Open Closed Principle, Liskov Substitution Principle, Interface Segregation Principle, and Dependency Inversion Principle. For each principle, it provides a brief definition and example to illustrate how to apply that principle to achieve high cohesion and loose coupling in software design. The overall message is that following SOLID principles can help software designs withstand changes over time by avoiding rigidity, fragility, immobility, and viscosity.
The document discusses the key concepts of functional programming including:
- Functional programming uses functions as building blocks and avoids mutable state and side effects.
- Pure functions, immutability, recursion, and function composition are important characteristics.
- Functional programming is well-suited for concurrency since immutable data prevents data races.
- Some benefits of functional programming include simpler code for complex problems, increased correctness from avoiding side effects, and ease of parallelization for concurrency.
The document discusses design patterns, which are common solutions to recurring problems in software design. It provides examples of some common design patterns like factory pattern, abstract factory pattern, builder pattern, and prototype pattern. It also discusses categories of design patterns like creational, structural and behavioral patterns.
Many occasion students are wondering which one should they choose in coding and why .In most cases, we want to avoid inheritance. We should use abstract classes only when we want to include functionality, but parts of the class's purpose need to be implemented by the child class.With abstract classes, you are forcing other developers to implement child classes using inheritance. Interfaces are much easier to add to existing classes, and with defender methods there is little reason to not consider interfaces first.
Hack in the Box GSEC 2016 - Reverse Engineering Swift Applicationseightbit
Swift apps present some challenges for reverse engineering compared to Objective-C apps. The main challenges are that Swift is less dynamic and there is limited tooling available. To analyze Swift apps, one can disassemble the binary and demangle Swift function names using the swift-demangle utility. For apps with Objective-C code as well, the class-dump tool can provide some class information. Runtime inspection using debuggers is also possible but less straightforward than with Objective-C. Overall, while more difficult, many typical reverse engineering tasks can still be performed on Swift apps.
The modern view on implementation of classic design patterns in JavaMikalai Alimenkou
Almost every developer heard about design patterns. They was introduced long time ago to solve particular set of repeating problems in systems of different complexity level and size. But there is an opinion that many design patters just filled holes in the OOP languages of that time. Java as one of them has transformed and improved significantly in the last 10 years. So may be we could review design patterns implementation in modern Java world? Some of them are now may be easily replaced with language idioms, some others may be covered with existing libraries and frameworks. I'm sure you know some design patterns that are dead now or became anti-patterns in their initial implementation. Lets make this fun and useful review together!
C# is a programming language that was created for use with the .NET platform, allowing access to libraries for Windows development (1). C# code consists of human-readable source code written in a text editor (2). The document then discusses some key elements of C# including statements, variables and assignment, types, strings, and whitespace (3).
The document discusses object-oriented programming concepts like classes, objects, methods, properties, inheritance, and polymorphism. It provides examples of different OOP concepts in C# like class definitions, object creation, method overloading, and inheritance hierarchies. The key topics covered include defining classes with data members and methods, creating objects from classes, using inheritance to extend classes, and implementing polymorphism through method overloading and overriding.
This document discusses type checking and type inference rules implemented in a TypeSystem aspect. It contains:
1) Rules that implement semantic error detection by checking conditions and reporting errors/warnings.
2) Inference rules that calculate the types of nodes based on concepts and patterns, such as setting the type of integer nodes to int and string nodes to string.
3) Rules establishing restrictions on the type of assigned values being subtypes of assignees.
4) The concept of a UserField that sets the type of user fields to the name of the entity type. Separate type checking must be implemented for user fields.
Design patterns are reusable solutions to common programming problems. The Gang of Four (GoF) authored the seminal book on design patterns, identifying 23 patterns divided into creational, structural and behavioral categories. Creational patterns provide object creation mechanisms, structural patterns manage object relationships, and behavioral patterns define communication between objects. Design patterns can be further divided into class and object patterns based on whether relationships are defined at compile-time or run-time.
Design Principle and Design Pattern examples on C# .NET Core.
(Note: Not all the contents are original, I copied some of them from online tutorials while learning and found great explanations. A great thanks to all for this information.)
Xtext is an open-source framework for developing programming languages and domain-specific languages. It generates parsers and abstract syntax trees from language grammars. It provides an Eclipse-based IDE with features like syntax highlighting, code completion, navigation, and refactoring support. A tutorial document outlines how to create a new Xtext project and write a sample grammar for a "Language of Entities" DSL. The grammar defines entity and field rules with terminals like ID and INT, and supports optional, repetitive, and alternative elements.
This document provides information about taxonomic keys, which are tools used in taxonomy to identify unknown organisms. It defines taxonomic keys and their purpose of using diagnostic characteristics to lead to the identification of a species or genus. It then describes different types of single access keys, including dichotomous, bracket, indented, serial, and grouped keys. It also discusses multi-access keys and styles of presenting keys, as well as advantages and disadvantages of using taxonomic keys.
This document discusses different types of taxonomic keys that can be used to identify biological entities like plants, animals, and microorganisms. Taxonomic keys present the user with a series of choices about characteristics that ultimately lead to the identification of an unknown specimen. The main types discussed are indented keys, simple bracket keys, simple non-bracket keys, pictorial keys, box-type keys, circular keys, and branching keys. Each key type has advantages and disadvantages depending on the group being identified and whether it will be used by specialists or non-specialists like field workers.
The document describes aspects of creating and defining a domain-specific language in MPS, including defining concepts, structure, editors, and relationships between concepts. Key concepts include Entity, Field, and Statement. Concepts can be abstract, extended by subconcepts, and implemented as interfaces. Editors are defined for concepts. The language is played with and compiled in a sandbox solution.
This document discusses different types of errors in programming:
1. It covers syntax errors, runtime errors, logic errors, incorrect operator precedence errors, and threading errors as sources of errors.
2. It provides examples of each type of error, such as division by zero for runtime errors and wrong scoping of variables for logic errors.
3. The document concludes with asking readers to discuss common errors they have encountered and providing a short quiz question about error types.
Projectional editing is an approach where the user directly edits an abstract syntax tree (AST) representation of code rather than text. The editor mimics a text editor to some extent by allowing the user to see and edit placeholders that represent the AST, though the user is actually editing the AST directly rather than text. This approach allows languages to evolve more easily than with text-based parsing since the AST structure is unambiguously defined, and it also allows languages to be more easily combined by defining a common set of node types.
This presentation explores the benefits of functional programming, especially with respect to reliability. It presents a sample of types that allow many program invariants to be enforced by compilers. We also discuss the industrial adoption of functional programming, and conclude with a live coding demo in Scala.
A slide about Pragmatic Approaches, such as, Evils of Duplication, Orthogonality, Reversibility, Tracer Bullets, Prototypes and Post-it Notes, Domain Languages and Estimating.
Source : A Pragmatic Programmer, written by Andrew Hunt and David Thomas.
This document discusses functional programming. It begins by stating that functional programming popularity has increased, with languages like F#, Haskell, Scala, Erlang and Elixir gaining popularity. Even OOP languages like C# and Java have incorporated some functional features. The document then covers key concepts of functional programming like pure functions, immutability, higher order functions and referential transparency. It discusses how C# supports a multi-paradigm approach, combining functional programming with imperative programming. Finally, it notes that functional programming is trending due to benefits for concurrency and parallel processing.
The document provides an overview of Python's typing module introduced in Python 3.5. It discusses the benefits of type hinting, including better documentation, finding bugs, and standardization. It demonstrates applying type hints to a simple function and running a type checker. Tips are provided for gradually adding type hints to improve code quality without changing functionality.
This document discusses the SOLID principles of object-oriented design. It introduces each principle - Single Responsibility Principle, Open Closed Principle, Liskov Substitution Principle, Interface Segregation Principle, and Dependency Inversion Principle. For each principle, it provides a brief definition and example to illustrate how to apply that principle to achieve high cohesion and loose coupling in software design. The overall message is that following SOLID principles can help software designs withstand changes over time by avoiding rigidity, fragility, immobility, and viscosity.
The document discusses the key concepts of functional programming including:
- Functional programming uses functions as building blocks and avoids mutable state and side effects.
- Pure functions, immutability, recursion, and function composition are important characteristics.
- Functional programming is well-suited for concurrency since immutable data prevents data races.
- Some benefits of functional programming include simpler code for complex problems, increased correctness from avoiding side effects, and ease of parallelization for concurrency.
Crafty communications - Dealing with the pesky people parts of communicationsAsher Glynn
The document discusses challenges with communication between different crafts and professions due to differing terminology and approaches. It provides examples of terminology differences between fields like brewing, construction, cooking, etc. It then discusses techniques for building a common language, including user stories, pair programming, design patterns, and code reviews focused on intent rather than style. It notes where these techniques are effective and how they can go wrong. It also addresses different personalities that can impact communication effectiveness.
Paul Nathan gave a presentation on practical functional programming. He began by introducing himself and explaining why functional programming is an important paradigm to learn. He then defined key concepts in functional programming like first class functions, differences from object oriented programming, avoiding side effects, and advanced type systems. The presentation included examples in Haskell and Common Lisp to demonstrate how functional programming is implemented in different languages.
Our C# expert Eric Lippert provides his take on the psychology of C# analysis, including the business case for C#, developer characteristics and analysis tools.
- Implicit function types are a powerful way to abstract over contexts by defining types that inject implicit values into a scope. This can fundamentally change the code we write by removing boilerplate around passing implicit parameters and configurations.
- Implicit parameters are a core Scala feature that allow removing repetition through parameterization while enabling use cases like proving theorems, establishing context, and implementing type classes. Their scope may be expanded through implicit function types.
- Future Scala versions aim to tighten rules for implicit conversions while introducing features like lazy implicits, multiple implicit parameter lists, and coherence to improve the discoverability and reasoning around implicits.
The document discusses principles for writing clean and comprehensible code. It covers topics like:
- Thinking about context and goals before applying patterns or paradigms.
- Favoring declarative code over imperative code to reduce complexity and coupling.
- Avoiding null values and static methods/variables when possible as they make code harder to reason about and test.
- Using immutable objects when able to improve thread-safety, reduce defects, and enable caching/sharing.
- Keeping methods and classes small and focused on single responsibilities to improve readability and maintainability.
This document summarizes Martin Odersky's talk on implicits in Scala. The key points are:
1. Implicits allow certain values or functions to be passed implicitly rather than explicitly as parameters. This can avoid tedious repetition when many parameters rarely change.
2. Implicits are commonly used to establish context, inject dependencies, implement type classes, and prove theorems by modeling types as theorems and programs as proofs.
3. Future changes to implicits in Scala 3 include allowing multiple implicit parameter lists, implicit by-name parameters, and implicit function types which avoid wrapping implicits in monads.
Introduction to Functional ProgrammingDave Fancher
Functional programming is a programming paradigm that emphasizes functions and immutable data. The key principles of functional programming include:
1) Functional purity by avoiding side effects and making functions dependent only on their inputs.
2) Favoring expressions over statements by writing small, pure functions that take inputs and return outputs.
3) Treating functions as first-class objects that can be passed into other functions as arguments and returned from functions.
This document discusses new features introduced in Java 8, including default methods in interfaces, static methods in interfaces, the Optional class for dealing with null values, and lambda expressions. Default methods allow interfaces to provide implementation code while maintaining backwards compatibility. Static methods in interfaces allow grouping of utility methods without utility classes. The Optional class avoids null pointer exceptions by allowing values to be absent. Lambda expressions allow treating functionality as a method argument or code as data, bringing benefits of functional programming to Java.
This document introduces F# and discusses some benefits of using the functional programming language for startups. It provides an overview of F#, covers some basic concepts like type inference and functions, and gives examples of how F# can concisely represent business logic and interact with external APIs. The document argues that F# allows developing applications faster and happier than other languages due to its simplicity, safety, and integration with .NET.
The document discusses several object-oriented (OO) design principles including the single responsibility principle (SRP), open-closed principle (OCP), Liskov substitution principle (LSP), interface segregation principle (ISP), and dependency inversion principle (DIP). It also discusses design patterns, refactoring, and design by contract (DBC) as ways to prevent software decay over time and improve design quality. The key OO principles guide developers to create flexible, maintainable and reusable software designs.
This document discusses implicit function types as a way to abstract over context in programming. It proposes implicit function types as a lighter-weight alternative to type classes and the reader monad for passing implicit context parameters. Implicit function types allow context to be provided implicitly based on the expected type rather than requiring it to be passed explicitly. The document outlines the typing rules and translation to the lambda calculus for implicit function types and provides examples of their use in a conference management system and the builder pattern.
The document discusses object-oriented design principles and patterns. It covers topics like encapsulation, inheritance, polymorphism, the open-closed principle (OCP), dependency inversion, and architectural patterns like layered architectures and domain-driven design. Examples are provided to illustrate concepts like dependency injection and inversion of control. The conclusion emphasizes applying principles pragmatically based on user needs while aiming for maintainable code.
This document provides information about an upcoming programming languages course, including:
1. Links to resources like a discussion forum, notes repository, and calendar.
2. An overview of topics that will be covered like basic types, type interactions, and different typing strategies.
3. Examples of how types will be defined and categorized based on their meaning, composition, and consequences.
Similar to Designing Nullable Reference Types in F# (20)
Most important New features of Oracle 23c for DBAs and Developers. You can get more idea from my youtube channel video from https://youtu.be/XvL5WtaC20A
8 Best Automated Android App Testing Tool and Framework in 2024.pdfkalichargn70th171
Regarding mobile operating systems, two major players dominate our thoughts: Android and iPhone. With Android leading the market, software development companies are focused on delivering apps compatible with this OS. Ensuring an app's functionality across various Android devices, OS versions, and hardware specifications is critical, making Android app testing essential.
UI5con 2024 - Bring Your Own Design SystemPeter Muessig
How do you combine the OpenUI5/SAPUI5 programming model with a design system that makes its controls available as Web Components? Since OpenUI5/SAPUI5 1.120, the framework supports the integration of any Web Components. This makes it possible, for example, to natively embed own Web Components of your design system which are created with Stencil. The integration embeds the Web Components in a way that they can be used naturally in XMLViews, like with standard UI5 controls, and can be bound with data binding. Learn how you can also make use of the Web Components base class in OpenUI5/SAPUI5 to also integrate your Web Components and get inspired by the solution to generate a custom UI5 library providing the Web Components control wrappers for the native ones.
Using Query Store in Azure PostgreSQL to Understand Query PerformanceGrant Fritchey
Microsoft has added an excellent new extension in PostgreSQL on their Azure Platform. This session, presented at Posette 2024, covers what Query Store is and the types of information you can get out of it.
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeAftab Hussain
Understanding variable roles in code has been found to be helpful by students
in learning programming -- could variable roles help deep neural models in
performing coding tasks? We do an exploratory study.
- These are slides of the talk given at InteNSE'23: The 1st International Workshop on Interpretability and Robustness in Neural Software Engineering, co-located with the 45th International Conference on Software Engineering, ICSE 2023, Melbourne Australia
Atelier - Innover avec l’IA Générative et les graphes de connaissancesNeo4j
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Allez au-delà du battage médiatique autour de l’IA et découvrez des techniques pratiques pour utiliser l’IA de manière responsable à travers les données de votre organisation. Explorez comment utiliser les graphes de connaissances pour augmenter la précision, la transparence et la capacité d’explication dans les systèmes d’IA générative. Vous partirez avec une expérience pratique combinant les relations entre les données et les LLM pour apporter du contexte spécifique à votre domaine et améliorer votre raisonnement.
Amenez votre ordinateur portable et nous vous guiderons sur la mise en place de votre propre pile d’IA générative, en vous fournissant des exemples pratiques et codés pour démarrer en quelques minutes.
Software Engineering, Software Consulting, Tech Lead, Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Transaction, Spring MVC, OpenShift Cloud Platform, Kafka, REST, SOAP, LLD & HLD.
Transform Your Communication with Cloud-Based IVR SolutionsTheSMSPoint
Discover the power of Cloud-Based IVR Solutions to streamline communication processes. Embrace scalability and cost-efficiency while enhancing customer experiences with features like automated call routing and voice recognition. Accessible from anywhere, these solutions integrate seamlessly with existing systems, providing real-time analytics for continuous improvement. Revolutionize your communication strategy today with Cloud-Based IVR Solutions. Learn more at: https://thesmspoint.com/channel/cloud-telephony
Microservice Teams - How the cloud changes the way we workSven Peters
A lot of technical challenges and complexity come with building a cloud-native and distributed architecture. The way we develop backend software has fundamentally changed in the last ten years. Managing a microservices architecture demands a lot of us to ensure observability and operational resiliency. But did you also change the way you run your development teams?
Sven will talk about Atlassian’s journey from a monolith to a multi-tenanted architecture and how it affected the way the engineering teams work. You will learn how we shifted to service ownership, moved to more autonomous teams (and its challenges), and established platform and enablement teams.
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j
Dr. Jesús Barrasa, Head of Solutions Architecture for EMEA, Neo4j
Découvrez les dernières innovations de Neo4j, et notamment les dernières intégrations cloud et les améliorations produits qui font de Neo4j un choix essentiel pour les développeurs qui créent des applications avec des données interconnectées et de l’IA générative.
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Crescat
Crescat is industry-trusted event management software, built by event professionals for event professionals. Founded in 2017, we have three key products tailored for the live event industry.
Crescat Event for concert promoters and event agencies. Crescat Venue for music venues, conference centers, wedding venues, concert halls and more. And Crescat Festival for festivals, conferences and complex events.
With a wide range of popular features such as event scheduling, shift management, volunteer and crew coordination, artist booking and much more, Crescat is designed for customisation and ease-of-use.
Over 125,000 events have been planned in Crescat and with hundreds of customers of all shapes and sizes, from boutique event agencies through to international concert promoters, Crescat is rigged for success. What's more, we highly value feedback from our users and we are constantly improving our software with updates, new features and improvements.
If you plan events, run a venue or produce festivals and you're looking for ways to make your life easier, then we have a solution for you. Try our software for free or schedule a no-obligation demo with one of our product specialists today at crescat.io
SMS API Integration in Saudi Arabia| Best SMS API ServiceYara Milbes
Discover the benefits and implementation of SMS API integration in the UAE and Middle East. This comprehensive guide covers the importance of SMS messaging APIs, the advantages of bulk SMS APIs, and real-world case studies. Learn how CEQUENS, a leader in communication solutions, can help your business enhance customer engagement and streamline operations with innovative CPaaS, reliable SMS APIs, and omnichannel solutions, including WhatsApp Business. Perfect for businesses seeking to optimize their communication strategies in the digital age.
Hand Rolled Applicative User ValidationCode KataPhilip Schwarz
Could you use a simple piece of Scala validation code (granted, a very simplistic one too!) that you can rewrite, now and again, to refresh your basic understanding of Applicative operators <*>, <*, *>?
The goal is not to write perfect code showcasing validation, but rather, to provide a small, rough-and ready exercise to reinforce your muscle-memory.
Despite its grandiose-sounding title, this deck consists of just three slides showing the Scala 3 code to be rewritten whenever the details of the operators begin to fade away.
The code is my rough and ready translation of a Haskell user-validation program found in a book called Finding Success (and Failure) in Haskell - Fall in love with applicative functors.
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...XfilesPro
Wondering how X-Sign gained popularity in a quick time span? This eSign functionality of XfilesPro DocuPrime has many advancements to offer for Salesforce users. Explore them now!
Measures in SQL (SIGMOD 2024, Santiago, Chile)Julian Hyde
SQL has attained widespread adoption, but Business Intelligence tools still use their own higher level languages based upon a multidimensional paradigm. Composable calculations are what is missing from SQL, and we propose a new kind of column, called a measure, that attaches a calculation to a table. Like regular tables, tables with measures are composable and closed when used in queries.
SQL-with-measures has the power, conciseness and reusability of multidimensional languages but retains SQL semantics. Measure invocations can be expanded in place to simple, clear SQL.
To define the evaluation semantics for measures, we introduce context-sensitive expressions (a way to evaluate multidimensional expressions that is consistent with existing SQL semantics), a concept called evaluation context, and several operations for setting and modifying the evaluation context.
A talk at SIGMOD, June 9–15, 2024, Santiago, Chile
Authors: Julian Hyde (Google) and John Fremlin (Google)
https://doi.org/10.1145/3626246.3653374
4. Null itself is perfectly valid
It really is!
You need to represent ”nothing” in a programming language
null accomplishes the task of representing “nothing”
13. Main goals
Distinguish between nullable and non-nullable reference types in the F# type system
Make nullable reference types less desirable to use than non-nullable reference types
Offer helper functionality and patterns for dealing with nulls
Offer compiler analysis for unsafe access of nullable reference types
17. Generic constraints
‘T when ‘T: null
‘T when ‘T: struct
‘T when ‘T: not struct
‘T when ‘T: not null
New!
Semantics:
• Error if the constraint is instantiated with an
F# type that has null as a proper value
• Warning if constraint is instantiated with a
nullable reference type
18. Pattern matching (majority case)
NonNull pattern can be used
anywhere, not just at the end
‘null’ pattern MUST be the first
for this ‘s’ to be non-null, as
per existing rules
19. Pattern matching (column-based)
s1 and s2 are still nullable!
Typechecking proceeds before
column analysis
May need to use NonNull
patterns to handle this
20. F# type relations with nullability
Type equivalence (x = y; y <> z)
◦ Nullness ignored, but warning given on mismatch
Type subsumption (B a subtype of A)
◦ Nullness ignored, but warning given on mismatch
Method overload resolution
◦ Nullness ignored, but warning given on mismatches in arguments and return types
Abstract slot inference
◦ Nullness ignored, but warning given on slot mismatches
Duplicate method checking
◦ Nullness is completely ignored
21. Type inference and mixing null/non-null
• First element in each collection is a non-null string
• Introduction of nullable string introduces type equivalence mismatch
• Solution is to add explicit type annotation
22. Type inference and nullability assertions
We cannot associate any arbitrary bool value with
nullability. A nullability assertion is needed.
23. Nullability and obj
Nullability is completely ignored for ‘obj’ type
The ‘obj’ type is used when type information is thrown out
Making this nullable/non-nullable is pointless considering throwing out type information
24. Null analysis for nullable value types
Partial alignment of existing nullable value types is possible
◦ Same syntax may be possible (int?, float?, etc.)
◦ Same or similar rules for type relations and type inference
27. Attributes to affect compiler analysis
[<NotNullWhenTrue>] and [<NotNullWhenFalse>]
◦ Used in bool-returning functions or methods that check for null
[<EnsuresNotNull>]
◦ Used on functions or methods that throw an exception when null is encountered
[<AssertsTrue>] and [<AssertsFalse>]
◦ Used for asserting nullability, such as in test frameworks, and avoiding warnings
28. [<NonNullTypes>] attribute
Three cases:
• NonNullTypes(true)
• Nullability is a concept
• NonNullTypes(false)
• Nullability is not a concept
• No attribute at all
• Null oblivious semantics
30. Three choices involved
Distinguish between nullable and non-nullable reference types
Do not distinguish between nullable and non-nullable reference types
Null oblivious (i.e., no assumption in either direction)
31. What is null oblivious for F#?
No information about nullability for reference types in a given scope
If an oblivious value is given a nullable reference type, it is nullable
If an oblivious value is given a non-nullable reference type, it is non-nullable
Interesting question: What if ‘s’ is not annotated?
32. The case for null oblivious
Pros:
◦ Less warnings (if you don’t want them)
◦ Makes porting existing code a lot easier
◦ Logically consistent
Cons:
◦ Less warnings (if you do want them)
◦ More potential NREs
◦ Entire programs can be oblivious due to type inference
33. The case for assuming nullability
Pros:
◦ More warnings (if you want them)
◦ Less NREs if you account for the warnings
◦ Avoids completely oblivious programs
Cons:
◦ More warnings (if you don’t want them)
◦ Not logically consistent – no information means no assumptions, so why make them?
34. There is no perfect approach
Some users may prefer obliviousness
Some users may prefer assuming nullability
Getting it right will be a challenge
Current design is not set in stone (yet!)
38. Compiled form of F# options
• F# options compile to null for None case
• Changing this would be a massive source-
breaking change
• Ironically, F# options would be interpreted as
nullable reference types
• No good resolution to this quite yet
39. Why do this feature?
WAXING PHILOSOPHICAL ON NULLS