Language Critique
Languages I know
- C
- C++
- Rexx
- Java
- C#
- Julia
- Python
- Power Shell
Languages of interest
- Go
- Dart
- JavaScript
- Rust
- Swift
- Kotlin
- Mojo
Tell me..
- What languages have you learned in the order of your learning?
- Tell me the approximate amount of code you wrote in those languages.
- Are there some language features that you adore and those that you don't care for, and some that are just annoying?
What are some unique features of Java?
- Comprehensive
- Libraries and documentation
- Brilliant packaging design to share code
- Multi-threading a fundamental aspect of the language
- Memory ownership (garbage collection)
- Probably the first modern language that all other languages are now compared to
- An opinionated take on exceptions
- Machine independence
What are some new language additions to Java?
- Streams for processing collections declaratively and functionally in 8
- New module system in 9
- Local variable type inference
- Text blocks
- Switch expressions
- Sealed classes
Streams questions
- What is a typical sequence of processing a collection using filter, map, and a finishing function like sum?
- What are terminal functions like sum?
- Can you create your own terminal functions?
- What is lazy processing aspect of streams?
- What is a collector?
- What are key classes in streams?
- What are similarities between java streams, python list expressions, pandas and spark data frames?
What is the relationship between a lambda function and a class in Java?
What is the relationship between a lambda function and a class in Java?
What are some key classes and methods of java streams
- filter
- map
- terminal functions
- collectors
- sort
- comparators
- generate
- suppliers
- consumers
- foreach
What are some critiques of object oriented languages?
- Complexity: Object-oriented languages can sometimes lead to complex class hierarchies and design patterns, which can make code harder to understand and maintain, especially in large projects.
- Overuse of Inheritance: Inheritance, one of the core principles of object-oriented programming, can be overused, leading to deep and rigid class hierarchies that are challenging to modify and extend.
- Tight Coupling: Object-oriented designs can sometimes lead to tight coupling between classes, making it difficult to change one class without affecting others, which can reduce flexibility and reusability.
- Inefficiency: Object-oriented languages may introduce performance overhead due to dynamic dispatch, virtual method calls, and other runtime features.
- Verbosity: Some object-oriented languages, like Java, can be more verbose than other paradigms, leading to more code to accomplish certain tasks.
- Mutable State: Object-oriented languages often encourage mutable state, which can lead to more challenging debugging and concurrency issues.
- Difficulty in Parallelization: Designing concurrent and parallel systems in an object-oriented way can be challenging due to potential shared mutable state and synchronization issues.
- Learning Curve: Object-oriented concepts like encapsulation, inheritance, and polymorphism can be more difficult to grasp for beginners compared to other paradigms.
- Focus on Implementation Details: Object-oriented languages often emphasize implementation details, which can lead to less focus on higher-level abstractions and domain modeling.
- Scalability: Some object-oriented designs may not scale well for very large systems or certain domains.
Intriguing questions
- Why is "new" considered harmful in java and other object oriented languages?
- What is the difference between a constructor method like "new" and the other methods in a Java class?
Some stated reasons
- You forced an implementation on the consumer
- Because the constructor is not virtual and cannot be replaced at run time
- Further it cannot be parameterized by doing so
Tell me what is wrong with
- CORBA
- SOAP
- EJBs
- RMI
- REST
- Microservices
What are key features of functional programming languages
- Coming from academic mathematical communities to keep the implementations closer to the theory and proposals
- Functions are objects (also called first class functions)
- Immutability of data where functions receive and return
- High order Functions like filter, map, reduce, fold etc to process collections
Some examples
- Haskell,
- Lisp,
- Clojure,
- Erlang,
- and Scala
Some key unique language concepts in python
- Duck typing
- List comprehensions
- Generators and yield
- Closures
- Decorators
- With statement
REPL - Read-Eval-Print Loop
REPL - Read-Eval-Print Loop