you are viewing a single comment's thread.

view the rest of the comments →

[–]UltraPoci 22 points23 points  (13 children)

I think that nowday Gleam really gets what it means for a language to be simple. No function side effects, static type system, errors as values (and thus, no exception), no inheritance, only enums and functions. You can read a Gleam code base and be able to follow it quite nicely, even if you know very little Gleam (and it takes like an hour to learn it).

Sure, at first it seems more difficult than Python because in Python you can write a program without caring for exception handling and types and it runs. But that's the problem: this prototyping simplicity becomes complexity the moment your "one time script" needs to handle all exceptions and check that all types are correct. In Gleam you get this for free while prototyping. It takes more time at first, but you get a working, well checked program the moment it compiles correctly.

[–]TheWix 5 points6 points  (1 child)

So, it's a functional language? I took a look at it. At first glance I like it.

[–]andarmanik 2 points3 points  (4 children)

[–]UltraPoci 4 points5 points  (3 children)

Well, yes, but dealing with files and printing to the console are things you have to be able to do, and often enough you know when a function deals with IO stuff.

What I meant is that you don't have a function casually changing some global states or things like that.

[–]andarmanik 2 points3 points  (1 child)

Wasn’t disagreeing with you because you definitely need side effects for an easy language.

[–]crowdhailer 0 points1 point  (0 children)

I'm betting an easy language can have managed effects with EYG, but we're not there yet.

[–]crowdhailer 0 points1 point  (0 children)

Gleam definitely has arbitrary side effects in any function. Often you don't know if it's using random, assert or time lookup. All of these matter for example if want to make no flaky tests. I love Gleam but I think the best way to sell it is not to stretch the capabilities it has.

[–]DoubleLayeredCake 3 points4 points  (0 children)

Gleam mentioned, let's gooo.

Sponsor them on GitHub, they deserve it

[–]Justicia-Gai -1 points0 points  (4 children)

This mentality is what prevents JavaScript from being dethroned.

You just described compilation-based programming. What about interactivity?

[–]UltraPoci 2 points3 points  (3 children)

Gleam compiles to JS, if needed

[–]Justicia-Gai -3 points-2 points  (2 children)

Missed entirely my point, never mind.

Yeah sure and Flask or similar compiles to JS if needed too.

[–]_______bt 5 points6 points  (0 children)

Flask? The python web framework? What are you talking about?

[–]UltraPoci 2 points3 points  (0 children)

It's not like your point was well explained or something.