We can't find the internet
Attempting to reconnect
Something went wrong!
Attempting to reconnect
Analysis Summary
Performed authenticity
The deliberate construction of "realness" — confessional tone, casual filming, strategic vulnerability — designed to lower your guard. When someone appears unpolished and honest, you evaluate their claims less critically. The spontaneity is rehearsed.
Goffman's dramaturgy (1959); Audrezet et al. (2020) on performed authenticity
Worth Noting
Positive elements
- This video provides a concise, technically accurate summary of advanced Scala 3 features like Higher Kinded Types and Implicits that are often difficult for learners to find in one place.
Be Aware
Cautionary elements
- The use of 'expert vs. beginner' framing to subtly suggest that the creator's personal stylistic preferences are the only 'correct' way to write scalable code.
Influence Dimensions
How are these scored?About this analysis
Knowing about these techniques makes them visible, not powerless. The ones that work best on you are the ones that match beliefs you already hold.
This analysis is a tool for your own thinking — what you do with it is up to you.
Related content covering similar topics.
Exercism Summer of Sexp - solving challenges with Clojure
Practicalli
Parallel Map in Erlang
BEAM Channel - Erlang & Elixir
2025 Clojure Survey: Insights, Surprises, and What Really Matters
ClojureTV
Functional Programming Crash Course for Scala Beginners
DevInsideYou
Transcript
I'm going to try to explain 10 scholar features that are vital to understand in pretty much any scholar projects some of them are trivial some of them not so much let's get to it [Music] hey Vlad here from devantidy.com welcome to another video over the years I've made hundreds color related videos and I even thought Scala as a first programming language to people without any prior programming experience that said I frequently get questions about some of Scholars features because the answers to them are buried somewhere in gigantic playlists hopefully this video will become somewhat of a go-to place to find them also I have a three and a half hour Scala crash course if you're interested in any case let's go through them one by one right out of the message from our sponsors College jobs.com and rossjobs.dev check out the links in the description below if you're looking for a job this video is also brought to you by awesome people like yourself who support me on platforms like patreon GitHub sponsors and brand new by joining the YouTube membership program the contributions go right back into this channel they allow me to pay for a video editor who free some of my time which I then again choose to spend with you whether it's during live streams or answering your questions on Discord also you get to see my videos before everyone else which is nice there's many of you and only one of me so all it takes is a dollar thank you all right let's start our list with the right associative operators whereas most languages make a distinction between operators and functions and or methods Scala does not every operator is merely a method called and Scholar syntactically allows you to make the call look like an infix operator semantic highlighting that was recently introduced in metals helps a Tom in scholar 3 there is an additional constraint on non-symbolic method names you can only call them via the invix operator notation if they're explicitly marked with the infix keyword now usually the method in question is being called on whatever is on the left from the operator and whatever is on the right becomes the argument to that method however if the method name ends in a column when cold via the infix operator notation these sides are the object is on the right and whatever is on the left becomes the argument while in theory it sounds like an annoyance that you need to pay attention to at all times in practice there are very few right associative methods and most if not all of them are just concatenation methods on the collections in the standard Library the next feature on the list is string interpolation which is a way to create strings while splicing arbitrary Expressions into them on the surface string interpolation looks pretty straightforward just prepend the ask character to your strings and now you can write full-blown Expressions surrounded by color brace prepend it was a dollar symbol you can even leave out the curly braces for simple expressions like variable references there are several interpolators out there with slight differences and you can even Define your own the built-in ones are the as interpolator that we just discussed the F interpolator which allows you to insert printf style formatting options into your strings and the raw interpolator that allows you to leave unescaped special characters in there like backslash n it's still an interpolator though so you can Splash 4 blown Expressions into it that's all for the built-in ones but there are many interpolators out there created as parts of libraries for instance there is skunk a native postgres driver which comes with the SQL interpolator also there are libraries like sctp which comes with the URI interpolator you get the idea the next feature on the list are lambdas also known as Anonymous functions can you imagine being so famous that you are known even though you're anonymous anyways lambders are literals for functions the same as you can create things like ants or booleans out of thin air by using their respective literals you can create functions out of thin air as well they do sugar to instances of Anonymous classes behind the scenes and are used literally everywhere throughout the language pun intended I can go into details in such a short video but the tldr is that you have a parameter list that is separated from the body by an arrow to the right which is an equal sign followed by the greater than character I love ligatures when all the types are fully known meaning when your code expects a function and you use all of your parameters only one months in exactly the same order as they're defined there's even more syntactic sugar on top instead of first declaring the parameters followed by an arrow to the right and then using them in the body you can only write the body and replace the parameters with underscores the underscores don't work with string interpolation and honestly a bunch of other things like if expressions for example essentially this special syntax only works for very simple expressions and when you have a method that fully matches the signature when expected function the compiler will convert it for you so you don't need to wrap it in an extra Lambda this is called Ada expansion same as beta just without the B which brings us to partially applied functions not partial functions we'll get to those in a second we're talking about partially applied functions which is a way to adapt the signature of a method before air expansion kicks in personally rarely use partially applied functions I prefer to either manually wrap my methods into lambdas or rewrite the initial methods into their current versions which brings us to the next Point function occurring and higher order functions a high order function is a function or a method that receives one or more other functions usually lambdas as parameters or produces lambdas as a result that later part is often forgotten because most of the times higher order functions receive other functions as a parameter higher order functions is a classic concept from functional programming and it is syntactically supported by most modern programming languages even though some of them took almost a decade to implement it the most canonical examples of high order functions are methods on this color standard collections Library the method map knows how to Traverse the given collection and produce another one as a result you merely pass in a Lambda so that it knows how to transform each element while it does so the same goes for the method called filter it knows how to Traverse the collection in question and produce another one as a result you merely pass in a Lambda which acts as a predicate to decide whether to keep the element or not yet another example is a method called sort it knows how to Traverse a collection and produce a resulting one you mean passing a Lambda which acts as a comparator that decides the order of the resulting collection you get the idea high order functions are everywhere now current functions are a special case of high order functions those are the ones with at least two parameter lists they're called off the Haskell Curry an American mathematician who is very well known for the curry hammered lamback correspondence I have a video about it you might want to check it out in either invented the concept of curing nor Haskell the programming language but both of them are called after him now in programming it's trivial to have functions or methods with multiple parameters we have methods like this all the time however in math analyzing such functions is anything but trivial so mathematicians use a trick instead of having a function which takes say three parameters they use a function which takes only one parameter and returns a function which takes the remaining two to be more precise the second function doesn't take the two parameters either instead it takes the second parameter and returns a third function which would take the third parameter and that one which turns the final result if you call these functions one by one without storing the intermediate resulting functions it kind of looks like you're calling a function which has three parameter lists in fact Scala allows you to use multiple parameter lists when you're declaring functions as well behind the scenes as function current of course we're still not done talking about functions it's almost as if Scala was a functional programming language or something we've talked about partially applied functions before now the time has come to talk about partial functions whereas regular functions are defined for the entire domain meaning for all possible values for the types of the parameters a partial function is defined only on a portion of those values for instance instead of a function that takes a Boolean you'd have a function that only knows how to handle the true case if you pass and false an exception will be thrown at runtime which is why you should be extremely careful with partial functions we'll like type save things in Scala and partial functions go a little bit against this philosophy partial functions are merely a syntactic construct their only purpose is convenience in fact they're so convenient that we even sacrifice common sense for it for instance if I were to write a higher order function that wants a partial function as its parameter I should be allowed to pass in a total function as its argument well in reality this relationship is reversed when a total function is is required we can pass partial functions as argument because partial functions extend the functionality of total functions this is obviously an issue because the receiving function has no idea that what was passed in Deals Only with a portion of the domain again all of this was done on purpose for the sake of convenience which brings us to the next point which is pattern matching technically it's still part of the same point pattern matching is a feature that scaling newcomers fall in love with it's an extremely powerful syntactic sugar on top of branching and since we've been doing a fasting Eastern sedon of programming your entire code base might accidentally end up looking like a gigantic pattern match I recently made a video exactly about this point you might want to check it out we have a plethora of built-in patterns we have a pattern that matches some constants we have a pattern that matches on variables types Constructors a bunch of other things and even extractors that you can Define yourself did I mention that Scala stands for scalable language anyways the true power of pattern matching comes from three things and asset patterns try doing that with nasty Day sales Expressions I dare you pattern matching appears in tons of places throughout the language and from the fact that Scala is a very deep language meaning that it has only a couple of features but they can be combined in similarly infinite ways some of them would take me minutes to explain a single line of code like this one for example do you recognize the things that we discussed a couple of minutes ago please watch the video that I just mentioned to realize that pattern matching even though it's powerful is just a stepping stone to something bigger don't make the same mistake as literally every other scholar beginner don't overuse pattern matching it's not even just a scholar program the RAS Community is going through something similar as we speak oh look pattern matching it's so cool I don't mean to sound arrogant but it's sometimes adorable to watch other programming languages that are somewhat late to the party literally every JavaScript developer out there who started using typescript went oh look at that types are useful well good morning let's talk about higher kind of types now we humans frequently like to group things and so we use synonyms to the word group things like types client pattern class and so on I kind of types are named analogously to higher order functions these are types that are somewhat incomplete so you need to pass in another type to construct the full type so similarly how a high water function would receive another function as a parameter a high hour of time but receive another type as a parameter which is also why they're sometimes called type Constructors as an example of the problem that higher clients can solve is the ability to Define traits or functions which work with any kind of list whether it's a list of ins strings or even dogs not only that but I also allow you to write traits or functions that work with any kind of parameterized type not just list for instance option or i o just to name a few as long as those types are of the same kind namely a type Constructor with a single argument they'll fit this video is getting kind of long so let's move on to implicits and type classes implicits are arguably the most powerful scholar feature and with great power oh Jesus I can't do it if you're not familiar implicitous give the compiler a second chance on failed compilation whenever your code doesn't compile for type mismatch reasons the compiler won't give up it will look in a few special places for functions that will allow you to convert one type into another to make your code compile there are only two situations when the compiler will even attempt to do so number one something wants an apple and we give it an orange and number two you're trying to call a method on an Apple that doesn't exist the first case is sometimes called implicit implicits or implicit conversions and it's generally speaking frowned upon Because unless you have some fancy IDE it's not always obvious that an implicit conversion took place there are many cases that are obvious like for example a widening of a type like ends to a long however you could also Define your own implicit conversion that would go the other way and cause all sorts of habit the second case is sometimes called explicit implicits or extension methods and this one is pretty much loved by everyone Scala 3 has a new syntax for extension methods which makes them even more pleasant to use than before by the way guys if you want details I have videos about all of these things so you might want to check them out now the most interesting use case for implicit is actually another one it's the implementation of the adapter pattern it's just that you don't have to pass those adapters explicitly the compiler will do this for you assuming that your types are an ambiguous of course and also that there is only one implicitly available adapter that matches those types in Scala 3 the dedicated keywords for type classes are given and using let's move on to number nine we're almost done here I promise four comprehensions now four comprehensions look like for lows but if you do look at them like for Loops do yourself a favor and forget everything you know about four Loops because four comprehensions are not for Loops their full name is magnetic for comprehensions without going into details and Mona is just an interface with a method called flat map on it and if you want details I have multiple videos about monads on this channel now nested flat map calls is a one-way ticket to call back hell and so a full comprehension is merely a syntactic sugar it's a bunch of nested flat map calls followed by either a map if the yield keyword is used or a call to for each if the yield keyword is left out in Scala 2 or they do keyword is used in Scala 3. in scholar three you can even leave out the curly braces I have a full-blown video about four comprehensions alone obviously so you might want to check it out number 10 algebraic data types or adts which are a collection of types that can act as one for instance a color can be either red green or blue or an option can hold their value so it can be a sum of some value or a non if no value is present another way to look at them is as types that have multiple ways for constructing them they're also known as some types A rather mathematical way of looking at things remember Haskell Curry blame him it's hard to explain so check out my video about the curry Howard Lambda correspondence if you're curious another name they go by is co-products a concept from category Theory another thing that we won't get into today in any case they were a bit cumbersome to Define in scholar too and look pretty elegant in Scala 3 was the enum keyword there are some limitations to the syntax though in particular the nested enums are not well supported yet alright I have a bonus feature for you but before we get into that I also have an honorable Mansion case classes which is a way to define data structures they are loved by everyone and the only reason that they're not part of this list is because I wanted to limit it to 10 items and also they're pretty straightforward in tiny Public Service Announcement please stop slapping the case keyword on your classes just because you don't want to use the new keyword words in fact in scholar 3 you don't need to use a new keyword in most cases because of guys like you alright let's get into the bonus feature and wrap this up I couldn't leave it out because it's my favorite one in fact it's two features top level definitions and exports top level definitions are pretty straightforward in Scala 2 you weren't allowed to Define Val's bars deaths lazy valves and types at a top level in scholar three you can I love this feature because when packages are sheared across multi-project builds package objects are not enough because you can have only one of them exports which can also appear at the top level are an awesome feature which allows you to favor composition over inheritance I made a video about it naturally when exports appear at the top level they save you from repeated import statements which is a typical cause for a lot of merge conflicts imagine exporting something like 0. star in one place instead of having an Imports in literally every file that would be awesome unfortunately this feature is currently limited you can't export entire packages it's only a technical limitation though and there's currently an ongoing discussion on the scholar contributors Forum to improve the state of the art you might want to contribute for now the best you can do is use the hyphen y Imports compiler flag it's almost available in Scala 3.3 it's already merged and is available since rc1 3.3 is almost out by the way which removes the limitation for the indentation based syntax a highly controversial feature that I also made a video about of course anyways as already mentioned arguably the most powerful Scala feature is not any of those that I mentioned on this list instead it's the ability to combine them in seemingly infinite ways it's a two-edged sword though so don't cut yourself I hope you enjoyed this one check out the previous one and I'll see you in the next one for now as always it's been plot from devonside.com don't forget to like this video if you did subscribe if you want to improve the developer inside you and if you wish to contribute to Tech education just click the join button or check out my patreon or GitHub sponsors and watch my videos before everyone else and most importantly take care foreign [Music]
Video description
This video is a micro Scala Crash Course. Make sure to check out the links from our sponsors: Scala Jobs: https://scalajobs.com Rust Jobs: https://rustjobs.dev Idiomatic Imports (and Exports) https://contributors.scala-lang.org/t/idiomatic-imports/5788 00:00 Intro 01:16 Right Associative Operators 02:16 String Interpolation 03:16 Lambdas 04:34 Partially Applied Functions 04:59 Higher Order Functions 06:08 Function Currying 07:16 Partial Functions 08:21 Pattern Matching 10:04 Higher Kinded Types 11:05 Implicits 12:18 Typeclasses 12:38 For Comprehensions 13:31 Algebraic Data Types (ADTs) 14:25 Case Classes 14:48 Top Level Definitions 15:16 Exports 16:24 Outro Website: https://devinsideyou.com Patreon: https://patreon.devinsideyou.com Discord: https://discord.devinsideyou.com Telegram: https://telegram.devinsideyou.com Twitter: https://twitter.devinsideyou.com GitHub: https://github.devinsideyou.com LBRY: https://lbry.devinsideyou.com Install scripts: https://install.devinsideyou.com Giter8 templates: https://g8.devinsideyou.com Spotify concentration playlist: https://code.radio.devinsideyou.com Cheers and Happy Coding! #Scala