Тёмный

no one writes JavaScript anyway.. ReScript: the ReasonML successor 

Michigan TypeScript
Подписаться 6 тыс.
Просмотров 8 тыс.
50% 1

Опубликовано:

 

26 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 77   
@jimmygtimmons
@jimmygtimmons 4 месяца назад
Excellent overview of the benefits of Rescript! Looking forward to the followup.
@MichiganTypeScript
@MichiganTypeScript 4 месяца назад
if you think of any questions about ReScript between now and then, don't hesitate to drop us a comment (here, discord, email, whatever is easiest for you!)
@MichiganTypeScript
@MichiganTypeScript 4 месяца назад
so Rob is going to be returning to the stage in August to do a followup on ReScript. this next talk will be more about how they're using ReScript at Autobooks, but if you have any followup questions, reply to this comment and we'll be sure to get your questions into the next video!
@PaulSebastianM
@PaulSebastianM 3 месяца назад
ReScript and F# are now my favourite programming languages for just boring, usual day to day enterprise web apps.
@MichiganTypeScript
@MichiganTypeScript 3 месяца назад
sounds like a dream. wow. do you use them together in the same app, or just side-by-side for different elements (ReScript for the frontend, F# for the backend, maybe?)?
@PaulSebastianM
@PaulSebastianM 3 месяца назад
@@MichiganTypeScript I wish. I mean I just moved my personal projects to F# now. Not yet sure what to do with ReScript. Fable makes F# easy to use on the frontend.
@JEsterCW
@JEsterCW Месяц назад
Good and quick showcase of this lovely language.
@irlshrek
@irlshrek 3 месяца назад
i really wish rescript won over typescript. its just SO much better. its like rust but in the JS ecosystem
@MichiganTypeScript
@MichiganTypeScript 3 месяца назад
there's still time. after all: at this point, we don't need "winners" and "losers" because it's not zero-sum. e.g. If webassembly opens a lot of doors
@FourTwentyMagic
@FourTwentyMagic 3 месяца назад
this has all this bits of rust I love. super curious to try it out!
@MichiganTypeScript
@MichiganTypeScript 3 месяца назад
it really is a nice middleground, it seems. let us know how it goes! (seriously)
@nsk8ter524
@nsk8ter524 3 месяца назад
I remember trying to pick up ReasonML before typescript took off. The support for it was minimal across IDEs and trying to use it was painful. I dropped it and assumed Reason died a few years ago. Calling a typescript competitor the Reasonml successor is just bad branding. No one wants to use reasonml, dont associate with it. But we do need a faster and open source version of something that is like typescript.
@MichiganTypeScript
@MichiganTypeScript 3 месяца назад
> No one wants to use reasonml, dont associate with it. > But we do need a faster and open source version of something that is like typescript. not arguing (asking humbly): these back-to-back statements seem contradictory. Is it just that you don't like ReScript or that you _do_ like ReScript and want to break any associations between ReScript and ReasonML?
@Kampouse
@Kampouse 4 месяца назад
a talks about rescript finaly
@MichiganTypeScript
@MichiganTypeScript 4 месяца назад
we feel the same way: we'd love to see more content on this area and are crossing our fingers that the MiTS community won't hate it. after all: it's really something TypeScript developers might be interested in and can benefit from (we think... we'll see if we're right!).
@adicide9070
@adicide9070 3 месяца назад
thanks for presenting this. I think that TypeScript is a mashed together little monster and it is meh at best. But OCaml derivatives like Rescript need a lot of promotion to get out there, and talks like this look to be a part of it.
@MichiganTypeScript
@MichiganTypeScript 3 месяца назад
would you agree that, ultimately, it's JavaScript that's the mashed together little monster and TypeScript makes it more bearable (although, we understand the "lipstick on a pig" vibes some people get from it)? And thanks: we really want to surface things like ReScript (and others!) because of the whole "rising tide lifts all boats" thing.
@adicide9070
@adicide9070 3 месяца назад
@@MichiganTypeScript hehe wait, what other boats?
@MichiganTypeScript
@MichiganTypeScript 3 месяца назад
@@adicide9070 programming languages
@themykolas
@themykolas 3 месяца назад
"God forbid vanilla javascript" Been writing simple web-components with vanilla JS and don't want to look back.
@MichiganTypeScript
@MichiganTypeScript 3 месяца назад
if that works for you then full support from us!
@PeterStJ
@PeterStJ 2 месяца назад
same... I think it's a big misconception with types is that it pays off compared to the investment. my observations (and I was dealing with types even before typescript - back when google closure compiler was using es4-like types) is that the overall benefit does not contend the extra effort.
@yonas6832
@yonas6832 3 месяца назад
great talk
@MichiganTypeScript
@MichiganTypeScript 2 месяца назад
thanks! what did you like about it?
@TymurDaudov_aka_tymfear
@TymurDaudov_aka_tymfear 3 месяца назад
When you try to convince somebody and then start using words like "magical" :D :D
@MichiganTypeScript
@MichiganTypeScript 3 месяца назад
are you saying magic is good or bad?
@mrlectus
@mrlectus 3 месяца назад
@@MichiganTypeScript it's bad
@TymurDaudov_aka_tymfear
@TymurDaudov_aka_tymfear 3 месяца назад
@@MichiganTypeScript Bad. When you’re trying to convince engineers magic is the last thing you want to mention 😀
@ally_jr
@ally_jr 4 месяца назад
Great talk! ReScript is amazing, and the speaker did not disappoint!
@MichiganTypeScript
@MichiganTypeScript 4 месяца назад
Rob really is a treasure! Do you use (or hope/plan to use) ReScript? Even if not: anything you'd like to hear when Rob shows his company's codebase in the next talk?
@Joshua-dc4un
@Joshua-dc4un 4 месяца назад
So i have to go through the entire codebase to properly understand the type of something?
@MichiganTypeScript
@MichiganTypeScript 4 месяца назад
seems like you can just hover over it like in TypeScript? no?
@snatvb
@snatvb 4 месяца назад
main reason why I leave rescript - it's module system. I can't use it when every module is public :(
@MichiganTypeScript
@MichiganTypeScript 4 месяца назад
this surprised a lot of us at MiTS as well. is there really no way??
@snatvb
@snatvb 4 месяца назад
@@MichiganTypeScript maybe monorepos could help, but I usually works with huge codebase, where is context is really important. And I can have same names in different contexts. And this contexts can be nested. I leaved it when monorepos was something new, it was 2020 if I am corrent
@MichiganTypeScript
@MichiganTypeScript 4 месяца назад
@@snatvb very interesting. monorepos really are good for such things!
@spacedog4
@spacedog4 3 месяца назад
@snatvb You can use .resi (module interface) files to declare which functions (if any) should be public.
@snatvb
@snatvb 3 месяца назад
@@spacedog4 you didn't get what I mean, I mean global space for modules - i have collisions on module names
@peterchuk6718
@peterchuk6718 3 месяца назад
I write, in fact I avoid all the compilers
@MichiganTypeScript
@MichiganTypeScript 3 месяца назад
we've been thinking of making a video on writing machine code with a quill. would that be interesting?
@abdellahcodes
@abdellahcodes 4 месяца назад
Great ML language, but if you go that route, you're on your own
@MichiganTypeScript
@MichiganTypeScript 4 месяца назад
100% agreed. not a bad thing! "Do not go where the path may lead, go instead where there is no path and leave a trail."
@BboyKeny
@BboyKeny 3 месяца назад
I like writing my own utilities and have hand tailored abstractions. So a green field like that makes me feel pretty good. I think I'll check it out 😁
@xpynim
@xpynim 3 месяца назад
functional?
@MichiganTypeScript
@MichiganTypeScript 3 месяца назад
you betcha
@D_bugit
@D_bugit 3 месяца назад
Some part of it feels like kotlin
@MichiganTypeScript
@MichiganTypeScript 3 месяца назад
haven't used Kotlin: which parts seem similar?
@D_bugit
@D_bugit 3 месяца назад
@@MichiganTypeScript how the code is structured, in kotlin functions we can omit the open and closing bracket and all the logic will be inside as a scope of it and the last item will be returned as a value... You could Google and see how it is or to save some time just google for how to use "when expression in kotlin" and you will realize what I want say🙂🙂
@Dylan_thebrand_slayer_Mulveiny
@Dylan_thebrand_slayer_Mulveiny 3 месяца назад
33:54 dear god what even is that syntax. Let statements inside an object closure? No thanks. 55:08 "Sometimes typescript forces you to code defensively". Yeah, that's actually a good thing. Defensive coding/early returns is a GOOD pattern not a bad one. I'm glad this wasn't adopted. That looks like an absolute nightmare.
@SubhashishPradhan
@SubhashishPradhan 3 месяца назад
Let statements inside block scope is an intrinsic feature of JavaScript. However when the same thing is done in ReScript as shown in 33:54 it's a no no for you? Double standards. Give it a chance before you spread negativity.
@Dylan_thebrand_slayer_Mulveiny
@Dylan_thebrand_slayer_Mulveiny 3 месяца назад
@@SubhashishPradhan That's not a closure that's an object statement.
@SubhashishPradhan
@SubhashishPradhan 3 месяца назад
ReScript language documentation disagrees with you.
@bradmilburn8329
@bradmilburn8329 3 месяца назад
He was referring to type guards
@SubhashishPradhan
@SubhashishPradhan 3 месяца назад
Type guards were shown in 55:08. I haven't commented on that.
@SuperHeroINTJ
@SuperHeroINTJ 3 месяца назад
ReScript is not a sucessor to ReasonML. ReasonML does native. ReScript does not. I used to use Reason for native applications. Melange is a sucessor to Reason.
@MichiganTypeScript
@MichiganTypeScript 3 месяца назад
this came up on twitter: thanks for the clarification. it's genuinely hard to get all of this straight: we're hoping that someone from the ReScript/ReasonML/Melange camps (even one person!) will accept our very-genuine offer to make a quick video breaking it all down, but no bites yet (although some people did some good stuff trying to whiteboard it).
@TJ-hs1qm
@TJ-hs1qm 3 месяца назад
23:30 this kind of elite speak ("polymorphic variant") can easily be avoided (even "sum type" or "product type" would have been better) Scott Wlaschin has demonstrated many times that you can teach fp concepts with no gobbledygook
@akis854
@akis854 3 месяца назад
It’s not elite, it’s just unfamiliar. OOP has tons of jargon for example, and it’s not labeled as “elite”. It’s also a different concept from a “sum type” (and especially from “product type”)
@MichiganTypeScript
@MichiganTypeScript 3 месяца назад
asking for a friend... what's the difference between a polymorphic variant, a sum type, and a product type?
@akis854
@akis854 3 месяца назад
@@MichiganTypeScript Great question! Here's how I think about it: A sum type is a type-level "OR". If a `foo` type is either A | B | C - it has 3 possible states (that's where the "sum" part comes from, 1 + 1 + 1). In typescript terms, this is a discriminated union. A product type is your typical struct/record found in almost all languages, in the case of JS that would be an object. It's called "product", because you have to multiply (cartesian product) all the combinations of the fields to get the number of states. If you have a record User with 3 boolean fields, it would have 6 possible states (2x2x2). A polymorphic variant is similar to a sum type, but solves certain problems where you'd want to use the same variant constructor in multiple places. Probably best to refer to Rescript and OCaml docs for more details, I don't think I can do them justice in this format :) ocaml.org/manual/5.2/polyvariant.html rescript-lang.org/docs/manual/latest/polymorphic-variant
@TJ-hs1qm
@TJ-hs1qm 3 месяца назад
​@@MichiganTypeScript A sum type is basically like an enum, an enumeration type has a limited/fixed number of variations, for example TimeOfDayEnum = PM | AM or LedEnum = Red | Green | Blue. In type theory, a type with a fixed number of variants goes by "sum type". The idea is that the total number of possible values for this type is simply the sum of its variants. TimeOfDayEnum has 2 possible values and LedEnum 3. A product type, on the other hand, is more like a record. For example, a Coordinate record can have entries for X and Y. Coordinate(X, Y). The number of possible values for Coordinate is the product of all possible values for X and Y, i.e., X times Y. Hence, the name product type (for example, Coordinate has 2 x 3 = 6 possible values for values int X = 1..2 and int Y = 1..3). Sum types and product types go also by the name Algebraic Data Type (ADT). Algebraic is math speak for types that combine. Example: take Person(Name, AgeCategory) where AgeCategory = Minor | Adult. Person is a product type combined with a Name and a sum type. Sum Type can also consist of other sum types or product types. Deeply nested or recursive Sum Types and Product types are possible too (json). In OCaml, sum types are also called Variants. For polymorphic variants google up "Polymorphic vs. ordinary variants in OCaml" (Yehonathan Sharvit).
@TJ-hs1qm
@TJ-hs1qm 3 месяца назад
@@akis854 apologies, I was being too dramatic 😆
Далее
Avaz Oxun - Yangisidan bor
14:29
Просмотров 285 тыс.
Why is Vite Everywhere? | Evan You
38:32
Просмотров 34 тыс.
Decoding Perplexing TypeScript by Daria Caraway
26:50
Compilers, How They Work, And Writing Them From Scratch
23:53