Learning Elixir and also exploring other functional languages with static typing (Haskell). Excited for this research being performed since this will lead to more understanding of what will make the language better - static typing or lack thereof.
@pepa0072 жыл бұрын
I feel like each developer goes thru these 3 career stages: - first 10 years you don't want static typing, it's just noise for you - second 10 years you want static typing, you feel safer in large code base - third 10 years you don't want static typing, coz you understand everything that Jose Valim and Rich Hickey say I personally didn't get into that 3rd stage yet 😄
@JM-sy1by2 жыл бұрын
Completely the reverse for me. I spent the first 10 years using static typed languages, and the last 10 cavalier enough to use loosely typed languages in favor of productivity :) Pretty stoked for static typing in Elixir though
@jonnmostovoy24062 жыл бұрын
@@JM-sy1by I guess that the industry is yet to come to the third 10 years either. Given the prominence of TypeScript.
@xucongzhan9151 Жыл бұрын
@@jonnmostovoy2406 I doubt if it ever will. I like the syntax of many dynamic languages, but man, they didn't work well with editors before the rise of TS and LSP. The amount of bugs introduced by stupid typos had been driving me crazy. Developer experience is one of the main reasons TS earned its popularity today.
@danvilela Жыл бұрын
Im still unsure.. productivity is great until some crazy freaking bug happens and no ones knows why.. Of course this is my experience with JS.. I'm starting Elixir now, let's see how it goes.. Hope it is well!
@yoyolebatteur2 жыл бұрын
I don't care my much about static types, I just want to typehint function parameters instead of writing @spec and guards.
@smoked-old-fashioned-hh7lo4 ай бұрын
i wlll not use elixir until it has static types. hopefully the error messages are good too. one thing i love about rust is that the compiler is very explicit and clear. a lot of times it will tell you exactly what to do to fix your code. i know it probably won't be that good but it's better than nothing.
@jessejayphotography2 жыл бұрын
Would rather keep dynamic typing with a robust "TypeSpec" features to allow developers to spec out the expected types on robust well used functions. They can be used for documentation and eventually as feedback to a compiler or JIT. The whole point of the BEAM and OTP is to break fast and recover fast. This allows systems to be mostly resilient to the real world (the only world that matters) with the ability to be fixed in realtime with hot code reloading. The Erlang ecosystem has been running mission critical code for decades without the need for an aggressive type system. Immutability, concurrency, and OTP is where it is at.
@AdolfoNeto2 жыл бұрын
I am not a big fan of types but I love that research is being done on that!
@D4no002 жыл бұрын
The problem with typed languages is that most of them allow nil, since nil is returned when something goes wrong, this creates a lot of error prone code, I convinced myself about this time and time again when writing in GO. For a statically typed language that is also functional, you have to introduce monads, but at the same time they introduce a lot of new concepts and overheads, that the dynamic typing solves by default.
@aislanarislou2 жыл бұрын
Hahaha... Elixir doesnt solves the Nil (elephant on the room for almost all languages) problem at all. I think you would talk about Elm (and a very few other languages...) in this regard.. The "nil" problem is not a nature (and exclusive problem) of typed languages, my friend!!!!
@richardharris97082 жыл бұрын
Modern languages are dispensing with null. Two I can think of are Rust and Dart. Go is not a great example of a good, modern programming language.
@ChatGTA345 Жыл бұрын
Dart is also a pain in the butt to deal with nulls, I could never understand how it’s supposedly sound null safety translates into practice - I still have to deal with them and ignore them when I know a specific value can’t be null by construction, but the type inference doesn’t infer that.
@richardharris9708 Жыл бұрын
@@ChatGTA345 Are you dealing with code/libraries that isn't null-safe? If your whole code base is null-safe then it should just work basically. The next version of Dart making null safety a requirement anyway.
@ChatGTA345 Жыл бұрын
@@richardharris9708 Perhaps, though I'm not sure what that means really tbh. The very fact that language has nulls already says it's not completely null-safe. Pretty much the only modern null-safe lang is Elm, which doesn't have them
@jonnmostovoy24062 жыл бұрын
Very good talk! If someone is intrigued about what is the relationship between prooving stuff and typing stuff, make sure to check out Wadler's "Propositions as Types" in a form of a KZbin video or the paper!
@محمدفرج-ث7ذ3د2 жыл бұрын
The type system could catch alot of bugs if it is strong not just fancy type to give you autocomplation
@greven1822 жыл бұрын
Elixir is already strongly typed like Erlang is. What is not is statically typed as types are only checked at runtime (since it's a dynamic language).
@محمدفرج-ث7ذ3د2 жыл бұрын
@@greven182 thanks man i was wonder why elixir for me as programmer and human make a mistakes see it is easier than js or ts or python the stacktrace get from elixir give me answer for the problem instead of js or ts sometimes you get problem you could not even understand it is from you or from the lib in elixir alot of times i catch error and fix them from the first time and that the reason i just dump all language that i learn and work with them less boilplate and more performance and debugging like a peice of cake
@محمدفرج-ث7ذ3د2 жыл бұрын
@@greven182 but my talk about typescript i do not know what broken in this language it is the types week or the programming doing code think it is fancy but it is not readible to human
@flbn73772 жыл бұрын
@@محمدفرج-ث7ذ3د ahh, i see what you mean now. yes, typescripts errors are honestly quite terrible. definitely not human readable. for example, elm and rust’s static typing are the reason they’re able to give you such great developer ergonomics (language servers, error messages, documentation, etc). once you understand a little bit of the typescript spec, you will see that javascript suddenly makes sense. it’s weird!
@deimuader2 жыл бұрын
@@محمدفرج-ث7ذ3د python is also strongly typed
@jonnmostovoy24062 жыл бұрын
12:45 -- implementing a system under static requirements doesn't talk about the maintainability. Also, with types you have to perform quality-control too weed out the "stringly-typed" code bases. Tightly-typed systems make all of the partial refactorings fail at compile time and the vast majority of incorrect refactorings do the same.
@jonnmostovoy24062 жыл бұрын
Further down the line José states the importance of taxonomy, which I appeal to when I mention to the notion of "bugs appearing from refactoring".
@jonnmostovoy24062 жыл бұрын
28:50 -- code coverage isn't "catching" bugs though, it rather demonstrates the presence of bugs. There's a good reason that property-based testing rose to prominence! Property-based checking actually *does catch* bugs.
@jackgame88412 жыл бұрын
couldn't expect elixir gonna focus on machine learning
@poulticegeist Жыл бұрын
I feel like the examples for making the case against types replacing tests were a bit disingenuous. types ensure that you don't pass a string where a Boolean should be, but doesn't go down to the level of the value itself. Those should be handled by tests.
@jackgame88412 жыл бұрын
cool talk
@mrgerbeck2 жыл бұрын
Types help with code maintainability.
@thetilo86822 жыл бұрын
with types you have to maintain the schema, and that is extra work. If the schema is used in several projects, then the coordination adds additional effort... all in all, the maintainability goes down significantly, because changes to the code will take much more time.
@Antash_2 жыл бұрын
There's always a schema, but with static typing it's explicit, so instead of running into errors in production, you know about them at type-checking.
@ThiagoDamasceno-eq3mw9 ай бұрын
Fewer tests example is a bit disingenuous ... you have to compare apples to apples. In Ruby, I would have to make sure that passing nil to a method expecting a list actually raises an error...
@abhishekpandework4461 Жыл бұрын
i will not use a dynamic language (unless no other option is available). Static language take out so much burden from testing.
@محمدفرج-ث7ذ3د2 жыл бұрын
Typescript the types the code now is more complex than javascript
@flbn73772 жыл бұрын
this is just plain wrong. types bring clarity to both the programmer AND the compiler. elixir is already strongly typed, it’s just hidden from you. do you mean the transition from javascript to typescript is confusing? if so, i agree but i think it’s worth it. also, typescript’s type system is a bit weird, since it has to work around javascript quirks. it becomes second nature very fast. don’t read into type theory or anything complicated just yet :)
@jonnmostovoy24062 жыл бұрын
@@flbn7377 but flbn, now I can't push my bugs to prod and do half-assed refactorings!
@kikiculina27452 жыл бұрын
I do not want static types, it does not have too much sense for me, like if you are writing tests you will never need them.
@rallokkcaz2 жыл бұрын
Did you even watch the rest of the talk?
@kikiculina27452 жыл бұрын
@@rallokkcaz Yes, I did, I wanted to vote while Jose was asking questions but could not and then wrote comment xD