Remix.run Logo
rixed 5 days ago

And one can see how quickly they became mainstream...

int_19h 4 hours ago | parent | next [-]

Given that it's the AI doing the coding, it would be pretty quickly so long as it's decent at Haskell. Which it already is, surprisingly so actually for such a niche language. It doesn't necessarily write great code, but it's good enough, and the straightjacket type system makes it very hard for the model to sneak in creative hacks like using globals, or trip itself with mutable state.

egwor 5 days ago | parent | prev [-]

I think that’s because the barrier to entry for a beginner is much higher than say python.

jonathanstrange 5 days ago | parent | next [-]

IMHO, these strong type systems are just not worth it for most tasks.

As an example, I currently mostly write GUI applications for mobile and desktop as a solo dev. 90% of my time is spent on figuring out API calls and arranging layouts. Most of the data I deal with are strings with their own validation and formatting rules that are complicated and at the same time usually need to be permissive. Even at the backend all the data is in the end converted to strings and integers when it is put into a database. Over-the-wire serialization also discards with most typing (although I prefer protocol buffers to alleviate this problem a bit).

Strong typing can be used in between those steps but the added complexity from data conversions introduces additional sources of error, so in the end the advantages are mostly nullified.

baq 5 days ago | parent [-]

> Most of the data I deal with are strings with their own validation and formatting rules that are complicated and at the same time usually need to be permissive

this is exactly where a good type system helps: you have an unvalidated string and a validated string which you make incompatible at the type level, thus eliminating a whole class of possible mistakes. same with object ids, etc.

don't need haskell for this, either: https://brightinventions.pl/blog/branding-flavoring/

jonathanstrange 5 days ago | parent [-]

That's neat, I was about to ask which languages support that since the vast majority don't. I didn't know that you can do that in Typescript.

Mekaniko 2 days ago | parent [-]

Any language with an type system really...

Even OOP : if you have a string class, you can have a String_Formated_For_API subtype.

Just extends String, and add some checking.

But now the type checker "knows" it can print() a String_Formated_For_API just fine but not call_API(string).

qrobit 5 days ago | parent | prev | next [-]

I would argue that the barrier to entry is on par with python for a person with no experience, but you need much more time with Haskell to become proficient in it. In python, on the other hand, you can learn the basics and these will get you pretty far

azkalam 5 days ago | parent | prev | next [-]

Python has a reputation for being good for beginners so it's taught to beginners so it has a reputation for being good for beginners.

Byamarro 5 days ago | parent | prev [-]

I blame syntax. It's too unorthodox nowadays. Historical reasons don't matter all that much, everything mainstream is a C-family memember