Why Scala? | An introduction by Adam Warski

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

Комментарии • 61

  • @gravytopic
    @gravytopic 3 года назад +37

    Wow, Andy Warski really cleaned up his act. Who knew he was this smart?

  • @veronikavalentinova1766
    @veronikavalentinova1766 7 месяцев назад +1

    At 2:32 you mentioned that the community learned which Scala features to avoid - can you explain more?

    • @AdamWarski2
      @AdamWarski2 7 месяцев назад +2

      Sure :) I think one example would be the usage of symbolic operators, or over-reliance on such operators. Another would be that sometimes a mutable variable (`var`) is actually ok, as long as it's used locally - so local mutable state is often fine, global mutable state is where problems start. Yet another instance would be using too many implicits - for cases, where normal, "explicit" parameters work just as well - this might include dependency injection.
      That's not unique to Scala, btw. In Java, we had a similar history with learning (on own mistakes) not to over-use inheritance, for example.

  • @yanamalapushpanth5679
    @yanamalapushpanth5679 3 года назад +12

    Could you consider making tutorials or implementing some small usecases videos in scala.

  • @eg4933
    @eg4933 3 месяца назад +2

    Scala is actually the best. Industry hasn't caught yet.

    • @slizzardshroomer9666
      @slizzardshroomer9666 2 месяца назад +1

      I wouldn't say the best but it's one of the best.

    • @eg4933
      @eg4933 2 месяца назад +1

      @@slizzardshroomer9666 all they literally have to do is get low-level features like pointers etc included. Then you pretty much replace c++ by 95% and be far more accessible and productive than in c++. Because c++ was when hardware/storage was very limited, not the case anymore.

  • @heck_fy
    @heck_fy 4 месяца назад

    good overview, thank you very much!)

  • @robinhopeixoto
    @robinhopeixoto 4 года назад +8

    What your opinion about start in scala using akka? Or is better study zio/cats?

    • @jeanfdmelo
      @jeanfdmelo 4 года назад +6

      He has written a long post comparing those: blog.softwaremill.com/scalaz-8-io-vs-akka-typed-actors-vs-monix-part-1-5672657169e1

    • @AdamWarski
      @AdamWarski 4 года назад +7

      That's a good question! But without a definite answer. Both Akka-Typed, Monix and ZIO are interesting technologies and learning them should be very valuable, not only because you are learning a new library, but because of the overall approach to concurrent/distributed programming that they represent. I think I would try assessing what are the use-cases for which you might end up needing a library like akka or monix or zio, and learning the one which has the highes probability of being used in practice.

    • @robinhopeixoto
      @robinhopeixoto 4 года назад

      Great! I'll read the blog post. Choose the first stack to study without know good/bad part is very hard.

    • @jeanfdmelo
      @jeanfdmelo 4 года назад +6

      I am just a Scala enthusiast, so maybe my opinion is not so useful, but I decided to start with Akka for two main reasons. 1 - It's easier to find books and other resources. 2 - It seems that Akka is more required in job descriptions in Poland (where I live)
      I had to start somewhere.

    • @AlbertBikeev
      @AlbertBikeev 3 года назад +2

      I'd definitely not recommend starting with Akka... It goes against the notion of functional programming in Scala (local reasoning, type-safety) and it's also way too powerful as a tool, meaning that you can apply it to anything, but eventually, it'll be a mess unless a substantial amount of work put into maintenance (which is also against FP notions)

  • @omerpriel5588
    @omerpriel5588 Год назад

    It was a great video. Thanks

  • @zvimints
    @zvimints 3 года назад +4

    Thanks!
    What about performance between Java and Scala?
    They still run on the JVM but what’s the difference from performance aspect,
    Another question is how Scala handle vs. new Java versions?

    • @AdamWarski
      @AdamWarski 3 года назад +4

      Performance of the base language is comparable, but that depends more on the libraries that you use, rather than the language.

  • @suyogchoudhari
    @suyogchoudhari 4 года назад +18

    Thanks for the nice video but I always felt that code conciseness is taking away code readability in scala. HelloWorld examples always look easy but in reality, doing some complex data manipulation code looks concise but hard to understand for not only peer engineer but to myself when I read it again.

    • @AdamWarski
      @AdamWarski 4 года назад +13

      Sure, it's a fine art and you shouldn't be too concise, beyond comprehensibility.
      The difference with Scala is that you have the option to be concise and you have the option to create more advanced abstractions, unlike in other languages which often lack these capabilities or have them to a limited degree. Just like normal tools - an electric saw gives you much more possibilities than a hand saw, but hurting yourself is much easier as well.

    • @zelon1983
      @zelon1983 2 года назад

      +1

  • @neuera9556
    @neuera9556 3 года назад

    Future of spark scala what to learn next

  • @ClewertonCoelho
    @ClewertonCoelho 4 года назад +4

    Why not model ADT with Scala 3 features like enums or sum types instead of sealed trait?

    • @AdamWarski
      @AdamWarski 3 года назад +2

      Sure, in the future that will be "the way". But currently Scala 3 is at version 3.0.0-M3, so for any production application, I would still recommend using Scala 2.

  • @donwald3436
    @donwald3436 2 года назад +1

    Is there Java interop yet?

    • @markhathaway9456
      @markhathaway9456 Год назад +1

      It compiles to the JVM, so it's there from the start.

    • @MrDejvidkit
      @MrDejvidkit 10 месяцев назад

      Yes its 100% supported and used in production.

  • @pvlr1788
    @pvlr1788 2 года назад

    What scala for?
    What tasks you can do with it?
    What products you can build with it?

    • @FlanPoirot
      @FlanPoirot 2 года назад

      2 big banks in my country uses scala on their enterprise apps that handle very large sums of money by big clients

    • @MrDejvidkit
      @MrDejvidkit 10 месяцев назад

      For everything you need. That is ok solvable on JVM or JS.
      Any task you like.t
      Any product you like. Mostly big apps. Like twitter and Spar. Also small frontend apps in JS or Backend services or WebApps.

  • @ben6
    @ben6 3 года назад +3

    Native bytecode? What’s that

    • @AdamWarski
      @AdamWarski 3 года назад

      Hm must be a slip of the tongue :) I don't know what native bytecode is either ;)
      What's the context, as I can't find where I mention that?

    • @amrojjeh
      @amrojjeh 3 года назад

      Essentially compiling it to a .exe file, so that it's specific to the platform and it doesn't require any third-party tools such as the JRE to run.

    • @SaHaRaSquad
      @SaHaRaSquad 3 года назад +2

      @@amrojjeh Well that's not bytecode anymore then.

    • @amrojjeh
      @amrojjeh 3 года назад

      @@SaHaRaSquad How come?

    • @SaHaRaSquad
      @SaHaRaSquad 3 года назад +3

      @@amrojjeh Bytecode is the term used for intermediary code prepared for VMs(like the Java VM) that's neither human-readable nor machine-readable(by the CPU). It can only be run by a compatible runtime environment. If you compile it to a normal executable file it's (native) machine code. So "native bytecode" isn't really a thing.

  • @jutublizard
    @jutublizard Месяц назад

    is sbt still a thing in scala world?

    • @AdamWarski2
      @AdamWarski2 Месяц назад +1

      Yes it is - and works quite well. Not ideal, but still better than the alternatives. There are some alternatives, e.g. scala-cli for simpler, single-module projects, or for sharing self-contained code samples.

    • @jutublizard
      @jutublizard Месяц назад

      @@AdamWarski2 Sorry for asking "stupid" questions but i'm a bit out of loop. Last time i used Scala professionally it was 2012... . Do i remember correctly that even Intellij had some problems parsing more complicated Scala code / sbt configs at that time? Is it still worth refreshing Scala knowledge in the current (sh**ty market) ?

    • @AdamWarski2
      @AdamWarski2 Месяц назад +1

      ​@@jutublizard Not stupid questions at all :) IntelliJ for Scala 2 "just works" (importing SBT, or other builds, syntax highlighting, code completion, etc.), alongside with some Scala-specific features (such as inlay hints showing intermediate operation types, or displaying the values of implicits). IntelliJ for Scala 3 still has sometimes problems, but I'd say it "mostly works". However, there's also Scala Metals (works with VS Code and other editors), which provides first-class Scala 3 support. The editor itself is not IntelliJ, but the syntax highlighting is flawless (it uses the compiler), and the compilation itself is very vast.

    • @jutublizard
      @jutublizard Месяц назад

      @@AdamWarski2 Is it still worth refreshing Scala knowledge in the current job market ?

    • @AdamWarski2
      @AdamWarski2 Месяц назад

      ​@@jutublizard Oh I won't attempt answering that :). From our - probably narrow and biased perspective - we are hiring senior Scala engineers (although, we do require polish as a spoken language, which limits our reach), and we do have clients asking for more Scala development capacity. However, keep in mind that Scala is one of the specialisations of SoftwareMill, so this might not represent the overall market.

  • @vrundashah914
    @vrundashah914 3 года назад

    File1 Code -
    class Abc {
    //code
    }
    File2 Code -
    Class Abc1 {


    var a:Abc = null
    try {
    a = new Abc()
    }
    }
    what does this line in file2 mean in scala "var a:Abc = null" where Abc is a class stored in file1

  • @VickyGYT
    @VickyGYT 3 года назад +2

    i though only c++20 and future is getting ugly syntax... :D

    • @godnyx117
      @godnyx117 3 года назад +2

      Isn't c++20 getting more readable tho?

  • @masteryoda9044
    @masteryoda9044 Год назад +1

    The more I learn about the more I find out how ugly it is.

    • @MrDejvidkit
      @MrDejvidkit 10 месяцев назад

      Yes, and that dirty syntax makes my eyes wet with all those semicolons and return statements missing from my sight; it doesn't even look like code anymore.

  • @rafihmahfooz5074
    @rafihmahfooz5074 3 года назад +1

    Julia

  • @jcbrites
    @jcbrites Год назад +3

    This video is absurd. It's trying to convince newcomers to scala about the benefits of scala, but it's given at a pace too fast for beginners and assumes too much knowledge of scala already.

    • @MrDejvidkit
      @MrDejvidkit 10 месяцев назад +1

      This is not beginners video. There are other excellent sources on the internet for that.

    • @russianvideovlogguy
      @russianvideovlogguy 9 месяцев назад

      I’ve never seen scala but have no issue with the presentation. You must be coming from js or some other front end framework, I use C and targeted assembly language. I forget that most developers probably don’t have a clue how to program, there is difference between someone who builds the tools vs people that use the tools.

  • @বাবুপরিমলকান্তিবড়ুয়ারশেষকৃ

    Twitter and linked in hack not possible but facebook possible.