Could Elm replace JavaScript?

  Рет қаралды 17,761

Awesome

Awesome

Күн бұрын

Пікірлер: 128
@demwunz
@demwunz Жыл бұрын
short answer is no.
@StellarWeb008
@StellarWeb008 Жыл бұрын
That is the first word of the long answer too
@striker865
@striker865 Жыл бұрын
I hope it does, Elm is such a friendly a pleasant place to be. As opposed to the chaos of JavaScript, though, some prefer the chaos. To each their own
@CharlonTank
@CharlonTank Жыл бұрын
It's been 5 years I work with elm. Never got any runtime error I love it :)
@awesome-coding
@awesome-coding Жыл бұрын
This pretty much sums it up.
@VeitLehmann
@VeitLehmann Жыл бұрын
I worked with Elm a few years ago. It's pretty nice as a language, but there were two things which I didn't like: First, as you mentioned, the templating. After working with JSX, it really feels like a big step back, it's far less readable and unintuitive to write. Second, the interoperability with JS. Even though it compiles to JS, plugging in third-party libraries requires a lot of work. What I liked better was ReasonML/ReScript. It solves similar problems, but it comes with JSX and integrates perfectly with React (React was even originally designed in OCaml, which resulted in ReasonML) and supports many React libraries. And adding new ones is pretty straightforward. It works best with React but it's not tied to it, there are also bindings for e. g. SolidJS. But it seems like ReScript, Elm and other alternative compile-to-JS languages have lost a lot of momentum in the last couple of years, TypeScript is just everywhere. I really preferred ReasonML's and Elm's type system and language features over TypeScript, but integrating untyped JS is just far easier with TypeScript, and the learning curve is much flatter when coming from JS. And sadly it's very hard to compete with such a massive ecosystem.
@awesome-coding
@awesome-coding Жыл бұрын
Thank you for the detailed answer! Reason looks interesting!
@kyonas6047
@kyonas6047 Жыл бұрын
@@awesome-coding its now glt seperated into another language called rescript and the reason community is dying XD
@awesome-coding
@awesome-coding Жыл бұрын
@@kyonas6047 Jeez... it's hard to keep track of all these :))
@coder_one
@coder_one Жыл бұрын
What's the difference between ReasonML/ReScript and which choose to achieve all this amazing interoperability with React & other JS labraries?
@NoidoDev
@NoidoDev Жыл бұрын
Thanks. Any comment on ClosureScript?
@AlexanderSuraphel
@AlexanderSuraphel Жыл бұрын
It appears that the only things that can replace JS are a superset language which will work with existing libraries( e.g. TypeScript) or any lang that compiles to WASM when it gets DOM access.
@awesome-coding
@awesome-coding Жыл бұрын
shoutout Rust!
@pookiepats
@pookiepats Жыл бұрын
​@Awesome don't get sued
@TechBuddy_
@TechBuddy_ Жыл бұрын
@@awesome-coding not endorsed by the rust foundation btw lmao 🤣
@awesome-coding
@awesome-coding Жыл бұрын
@@TechBuddy_ @pookiepats Haha! I hear there is a lot of drama in the Rust community recently. Leave it to humans, and they'll always manage to mess everything up...
@TechBuddy_
@TechBuddy_ Жыл бұрын
@@awesome-coding But Rust the language is amazing
@republicanhaircutman
@republicanhaircutman Жыл бұрын
Elm is a very nice little language that I think is just not well-enough supported. For ML in the browser, I’m leaning toward F# compiled to JavaScript with Fable.
@irfannurhadisatria2540
@irfannurhadisatria2540 Жыл бұрын
Are you using F# backend as well or another language? I'm interested in using Fable Elmish frontend for an Elixir app 🤔
@Microphunktv-jb3kj
@Microphunktv-jb3kj Жыл бұрын
@@irfannurhadisatria2540 why not use phoenix framework in elixir? :D
@Boxing_Gamer
@Boxing_Gamer 10 ай бұрын
Wouldn't call it a little language. It's a lot more complicated than javascript. It's also immensely more powerful. Not easy to learn unless you have prior experience in functional programming.
@Boxing_Gamer
@Boxing_Gamer 8 ай бұрын
@mariobroselli3642functional languages Haskel, f#, and scala. OOP java, c# and others
@samuraijosh1595
@samuraijosh1595 4 ай бұрын
​@mariobroselli3642Haskell or ocaml or any ML syntax language.
@voidtraveller01
@voidtraveller01 Жыл бұрын
The last elm release was almost 4 years ago (October 2019). I don't know if the project is still in development. But the official elm twitter seems to be active though.
@awesome-coding
@awesome-coding Жыл бұрын
You'll see activity in their git repo as well.
@voidtraveller01
@voidtraveller01 Жыл бұрын
@@awesome-coding Oh yes.
@SuperQuwertz
@SuperQuwertz 9 ай бұрын
Can you give alink? I wasnt able to find the activity :/@@awesome-coding
@dranon0o
@dranon0o 7 ай бұрын
Elm is known for slow release schedule on purpose, it's not dead since the community is still quite active
@coder_one
@coder_one Жыл бұрын
As far as I can tell, Elm, when compiled into JavaScript, resembles like a React/Vue SPA application (Elm has its own virtual DOM). As you know SPA (client-side-rendering) applications have big problems with SEO and achieving good results in Google Lighthouse. 1. Does Elm have support for server-side-rendering? 2. What is the reactivity model of an application written in Elm (is there a classic hydration like in React, or maybe something similar to resumability from Qwik)? 3. Can Elm be used to write backend in Node/Deno?
@kintrix007
@kintrix007 4 ай бұрын
Elm was intended as a frontend language. What it really achieves, is being a really nice alternative to front-end JavaScript. While it is *technically* possible to run it on node, since it compiles to JavaScript, it does not have built-in access to the Node API. For example, it cannot read files etc.
@coder_one
@coder_one 4 ай бұрын
@@kintrix007 I tested this on my own - for the last 10 months I've been learning Elm and writing a clone of a commercial application I was developing for my client. Conclusion - Elm is a cool toy if you want to play with functional programming, but this language is not suitable for writing commercial applications - it lacks integration with modern tools used on the frontend, and working with the ecosystem and JavaScript libraries (where it all is) is a nightmare. Elm in the field of languages that compile to JavaScript, which could be used production-wise, is probably the worst. By far a better choice is Rescript or PureScript. And it's a shame - because Elm had the potential to conquer the world of frontend...
@korigamik
@korigamik Жыл бұрын
Hell yeah! This is amazing. I love Haskell and this makes me 😊
@awesome-coding
@awesome-coding Жыл бұрын
Haskell managed to ruin quite few weekends for me :)) If you don't have enough experience, It's a struggle to switch to Lisp languages until things "click".
@terryriley6410
@terryriley6410 Жыл бұрын
​@@awesome-codingStop conflating Haskell/elm with Lisp. These are different languages with different syntax.
@samuraijosh1595
@samuraijosh1595 4 ай бұрын
What do you think about F#? Either on the backend or frontend?
@YuriG03042
@YuriG03042 Жыл бұрын
If we are going to work with languages that compile to Javascript later, why not stick to strongly backed languages like Dart or Kotlin instead? Those languages can also write actual web apps, without needing to use React Native, so it's also beneficial to your career if you want to move away from the mess that pure Javascript is.
@awesome-coding
@awesome-coding Жыл бұрын
This is a good point. I think there are advantages to diversity though. Even though Elm might not end up gaining the same type of popularity / community as some other established tool, it is still interesting to see alternatives and different takes on the same problem.
@terryriley6410
@terryriley6410 Жыл бұрын
elm is a DSL for writing webapps and it has nothing to do with React Native, I suggest you try it and compare the ease of use with Dart or Kotlin for webapps. elm is truly delightful to work with and experience with the language translates well to other functional languages.
@mawill432
@mawill432 Жыл бұрын
Fantastic video. Can you do a similar one on Elixir?
@awesome-coding
@awesome-coding Жыл бұрын
Thank you for your feedback! Elixir and Phoenix are "on my list" for quite a while now. The reality is that I'm not that familiar with this stack yet, so I'm not confident enough to make a proper video on this one at the moment 😅
@cg219
@cg219 Жыл бұрын
I doubt it, Elm seems to have been having problems growing its community. I've never used it myself so I don't really know why. I'm just all in on Javascript/Typescript now lol
@awesome-coding
@awesome-coding Жыл бұрын
I think it has a slower adoption because of: 1 - it's Lisp like syntax which really looks weird for those familiar with the a C / C++ programming style; 2 - building views is a really bad developer experience compared to HTML or JSX. However, Elm was a major influence in frontend development, and inspired some of the initial FLUX / Redux architecture proposals.
@terryriley6410
@terryriley6410 Жыл бұрын
​@@awesome-codingelm syntax is more akin to Haskell than Lisp.
@klirmio21
@klirmio21 Жыл бұрын
Great explanation of things!
@awesome-coding
@awesome-coding Жыл бұрын
Glad it was helpful!
@RedStone576
@RedStone576 Жыл бұрын
web development am i right
@ayoubMazouz
@ayoubMazouz Жыл бұрын
Yh! but this is only one thing.
@awesome-coding
@awesome-coding Жыл бұрын
😅 it never gets boring...
@limpiadora
@limpiadora Жыл бұрын
I didn't understand anything case I didn't try any functional language before, but they should've just stick to HTML, something like JSX
@awesome-coding
@awesome-coding Жыл бұрын
I agree with that. Their view system is a major deal breaker for me.
@alex_constantin
@alex_constantin Жыл бұрын
Thanks!
@awesome-coding
@awesome-coding Жыл бұрын
Thank you!
@cg219
@cg219 7 ай бұрын
9 months later, I still dont think there is a huge value prop for this if it just compiles down to Javascript. Has there been another use for ELM that isn't just an abstraction of Javascript??
@kintrix007
@kintrix007 4 ай бұрын
The main use is that is has significantly more guarantees than JS. If you write your frontend in Elm the chance that you will ever encounter a runtime error is VERY low. Edit: You can probably get a similar level of guarantees with TypeScript with nearly all of the strict compiler options enabled. Compared to TypeScript what is can offer is: safe JSON decoding. It ensures the schema of the JSON is what is expected. And it has a very uniform ecosystem. There is no question about how you do state management. No question of what library/framework to use with it. There is one default option and it works best in general.
@abdelazizabdelioua890
@abdelazizabdelioua890 Жыл бұрын
I smell elixir here
@awesome-coding
@awesome-coding Жыл бұрын
✌️
@NoidoDev
@NoidoDev Жыл бұрын
I'm interested in a good comparison between Elixir, Elm and Clojurescript - and the mainstream way to do things with Typescript and Bun.
@alexeylitvinov5178
@alexeylitvinov5178 10 ай бұрын
it 's a way more close to Haskell (and ML languages) than to Erlang/Elixir family
@nixoncode
@nixoncode Жыл бұрын
remember Dart. with all the power of Google, still didn't get anywhere. gladly it found its home with flutter
@awesome-coding
@awesome-coding Жыл бұрын
Right... I had high hopes for Dart at some point :)
@adjbutler
@adjbutler 4 ай бұрын
love it.
@pauljohnsonbringbackdislik1469
@pauljohnsonbringbackdislik1469 Жыл бұрын
Too short. I think we would benefit from diagnosing some example medium-size app.
@awesome-coding
@awesome-coding Жыл бұрын
I think you are right. I might work on a second video on the topic.
@knolljo
@knolljo Жыл бұрын
Probably only wasm can replace javascript when it gets direct dom access
@awesome-coding
@awesome-coding Жыл бұрын
That will be a game changer for certain.
@deathspell-grind
@deathspell-grind 6 ай бұрын
clearly elm wasn't the solution, but i believe that it is the direction that we need to further explore. as far as building a language that is designed around a specific pattern and also designed specifically for ui's. there was not much foresight when they designed javascript. it is illogical to continue banging our heads against the wall attempting to fix something that simply cannot be fixed. all of these "solutions" are only workarounds. the workarounds become abstractions and we are left with abstractions built on top of abstractions. until it reaches a point where javascript is hardly recognizable, which i believe we are in now.
@coder_one
@coder_one Жыл бұрын
Also worrying is the fact that looking at Elm's repository - there hasn't been a commit there for several years. The website of the language itself hasn't been updated for several years either. Could it be that the project has simply died?
@awesome-coding
@awesome-coding Жыл бұрын
You are right - there is little to no movement in the repos these days.
@terryriley6410
@terryriley6410 Жыл бұрын
If you look into elm you'll find that it has a really slow development cycle done mostly by a single person in private. Some people are put off by this, others view it as a sign of reliability and a testament to how stable and well designed elm is. There hasn't been updates to elm in years but it still functions very well. That being said the project is definitely not dead, Evan just had a somewhat secretive talk about elm on the backend and we will most likely see a big update soonish.
@coder_one
@coder_one Жыл бұрын
@@terryriley6410 Elm on backend (node/deno/bun I suppose - will be amazing) but still Elm on frontend is a few years behind actual modern frontend which is focused on server side rendering/seo friendly/lighthouse scorring sensitive. I'm afraid that pure SPA solutions like Elm are just not enough after 2020...
@coder_one
@coder_one Жыл бұрын
@@terryriley6410 on the other hand one-person development almost always end in some kind of disaster...
@terryriley6410
@terryriley6410 Жыл бұрын
@@coder_one It depends on what you are building. For the core of webapps you might not care much about seo friendliness and can benefit way more from the reliablility of elm. For websites you probably care more about seo. You can also combine elm and other stuff and just use it where you want to. I also suspect that elm on the backend might have an answer to seo questions as well. I don't think it will just be as basic as "now you can run elm inside node". Evan has a tendency to come up with awesome stuff after careful considerations.
@ycombine1053
@ycombine1053 Жыл бұрын
Not if no one is maintaining it...
@awesome-coding
@awesome-coding Жыл бұрын
Fair enough.
@terryriley6410
@terryriley6410 Жыл бұрын
yes if it actually works the same without maintanence, ie it is truly "stable". Also, it is maintained just not as fast as other languages and frameworks with more messy designs
@katungiyassin5573
@katungiyassin5573 2 ай бұрын
​@@terryriley6410I think you have a point, these updates of every month/minute suck. You may feel like you're off-trend/off-track yet you can use the same resources from 6 years back and achieve the same thing.
@JouleMelissa
@JouleMelissa Ай бұрын
320 Clint Isle
@CodeBreeze4
@CodeBreeze4 Жыл бұрын
elm bad clojurescript good
@awesome-coding
@awesome-coding Жыл бұрын
😂
@NoidoDev
@NoidoDev Жыл бұрын
I have to decide between those, and I like Lisp anyways. Thanks. Clojurescript isn't even in my Arch based distro's repo, though. Elm is there...
@ransomecode
@ransomecode Жыл бұрын
sorry but why is there always a space in-between "Java" and "Script" in your thumbnails? It's a little offending
@YuriG03042
@YuriG03042 Жыл бұрын
trying to not get sued by Oracle, that holds the Javascript patent
@awesome-coding
@awesome-coding Жыл бұрын
@YuriG03042 haha this is a funny reason! and to some extent it might be true 😅
@awesome-coding
@awesome-coding Жыл бұрын
@codeodyssey6729 I'm sorry - you are right. It's just a bad habit I guess.
@ЧингизНабиев-э2г
@ЧингизНабиев-э2г Жыл бұрын
No way, that's too much thinking for JS developers
@awesome-coding
@awesome-coding Жыл бұрын
😂
@bear458ziif-s
@bear458ziif-s Жыл бұрын
i have not used elm directly but i have used a gui framework in another language inspired by it and i wasn't much of a fan.
@awesome-coding
@awesome-coding Жыл бұрын
I know it's tough if you have no familiarity with this programming style.
@bear458ziif-s
@bear458ziif-s Жыл бұрын
​@@awesome-coding for me it's mostly that there's too much boilerplate and repeated code. if you don't have state, you still need to define an empty model and message. even with minimal state it's overkill. there's a lot of repeated code in general. so while it's nice to have that structure it can also be a negative.
@jNaimXIII
@jNaimXIII Жыл бұрын
I'll tell you what I'm tired of... You using that same yellow sweater girl stock footage. 💀 edit: Just realized, you use the same stock footage across all your videos. 💀
@awesome-coding
@awesome-coding Жыл бұрын
😅 I'll look for a different girl. edit: hence the name - stock footage
@ruaidhrilumsden
@ruaidhrilumsden Жыл бұрын
I'm fine with the stock footage! 😉
@Joshua.Developer
@Joshua.Developer Ай бұрын
JS is not the problem it's all these dumb frameworks that reinvent the wheel every single change they get. Truth is you really don't need a framework and if you do use one, you don't need all the fancy features keep it simple. MAYBE 10% of companies are using the most new Next.js features. For the most part your going to see, legacy codeish stuff, solid large companies are not going to rewrite code bases just because a new feature comes out.
@agcodes
@agcodes Жыл бұрын
rust 🦀
@ndanzzid566
@ndanzzid566 Жыл бұрын
no thanks, typescript is fine for me
@TechBuddy_
@TechBuddy_ Жыл бұрын
The best language is a procedural one. I don't want to do just fp or oop, I will use the right tool for the job so NO I don't care about it
@awesome-coding
@awesome-coding Жыл бұрын
Good point!
@IAmOxidised7525
@IAmOxidised7525 Жыл бұрын
Lol, you don't know JS , BRUH, you pass in a comparator function in sort to sort numbers
@YuriG03042
@YuriG03042 Жыл бұрын
brother, he wrote more lines of javascript in the past 10 years than you will in your entire life. if you don't know what a joke is, please go hang around humans more often
@awesome-coding
@awesome-coding Жыл бұрын
Right, it was meant as a joke. The joke being that JavaScript is a funny language with a lot of quirks such as the Array.prototype.sort() method non intuitively comparing UTF codes even for arrays of numbers.
@larjasoul
@larjasoul 4 ай бұрын
spoiler: no
@awesome-coding
@awesome-coding 4 ай бұрын
😅 fair
@akrishnadevotee
@akrishnadevotee Жыл бұрын
I'd rather write C😅
@TechBuddy_
@TechBuddy_ Жыл бұрын
You are comparing the best language to an offspring of the worst language. I'd write C over any other language ( even rust, my next fav language after C ) but it would take forever to shup any new feature lol 😂
@akrishnadevotee
@akrishnadevotee Жыл бұрын
C is okay but outside of embedded, it's pretty much useless. The syntax is nice though, way nicer than rust but the lack of STL is a huge con.
@terryriley6410
@terryriley6410 Жыл бұрын
​@@TechBuddy_elm is not an offspring of javascript, if anything it is an offspring of Haskell (it started as a thesis project Haskell subset lang). It uses JS as it's runtime which means little, it like saying any compiled language is an offspring of machinecode.
@TechBuddy_
@TechBuddy_ Жыл бұрын
@@terryriley6410 you know that's not a bad idea actually. "Every programming language is an offspring of binary" lmfao 🤣. Jokes aside Elm is not my problem js is. I know elm and js are almost completely different. I used the term offspring very very lightly there 😅
@sherriffs2554
@sherriffs2554 5 ай бұрын
This video is nonsense. It's just gifs and memes.
Жыл бұрын
No
Жыл бұрын
😂
@awesome-coding
@awesome-coding Жыл бұрын
fair enough
@saburex2
@saburex2 Жыл бұрын
Crap
@awesome-coding
@awesome-coding Жыл бұрын
😅
Use JavaScript Everywhere
6:25
Awesome
Рет қаралды 5 М.
Gleam v1 HAS BEEN RELEASED
27:07
ThePrimeTime
Рет қаралды 167 М.
黑的奸计得逞 #古风
00:24
Black and white double fury
Рет қаралды 30 МЛН
HELP!!!
00:46
Natan por Aí
Рет қаралды 39 МЛН
2 MAGIC SECRETS @denismagicshow @roman_magic
00:32
MasomkaMagic
Рет қаралды 28 МЛН
Elm crash course - Building unbreakable webapps fast
45:53
freeCodeCamp.org
Рет қаралды 99 М.
How is this Website so fast!?
13:39
Wes Bos
Рет қаралды 824 М.
Why You Shouldn't Nest Your Code
8:30
CodeAesthetic
Рет қаралды 2,8 МЛН
The Biggest Dev Lies
8:44
Awesome
Рет қаралды 35 М.
What You Missed in October
4:43
Awesome
Рет қаралды 18 М.
I used Elm in production and it cost me my job - Annaia Berry
23:31
Functional Programming & Haskell - Computerphile
9:19
Computerphile
Рет қаралды 670 М.
Should you learn Elixir in 2024?
6:34
Dreams of Code
Рет қаралды 100 М.
黑的奸计得逞 #古风
00:24
Black and white double fury
Рет қаралды 30 МЛН