4 ms·
My Impressions of Gleam
- vegabook 2y agoIt doesn't have a REPL which is strange for a BEAM VM language.
- dartos 2y agoThe article is fine, but I have one serious concern. How on earth do you prefer tabs to curly brackets?!?!
- worthless-trash 2y agoThis same discussion was had a long time ago when python was being more commonly used. I figure people just get used to it, and now we're in the inverse.
- dartos 2y agoIsn’t python currently the most popular programming language?
- fire_lake 2y agoJavaScript (and variants) is
- dartos 2y agoWhile not the be all end all, TIOBE disagrees. https://www.tiobe.com/tiobe-index/ https://www.tiobe.com/tiobe-index/ I think since the AI boom, Python took over.
- kibwen 2y agoI'm not here to take a stance on Python vs Javascript, but I am here to remind people that TIOBE is utter nonsense with no informational value whatsoever. Please stop linking it.
- dartos 2y agoIt has exactly as much value as discussing whether Python or JavaScript is more popular. Which is to say, very little.
- frabcus 2y agoPython is slightly above it on the StackOverflow 2024 developer survey. https://survey.stackoverflow.co/2024/technology#2-programming-scripting-and-markup-languages https://survey.stackoverflow.co/2024/technology#2-programmin...
- coder543 2y agoThe "admired and desired" chart has nothing to do with actual use. According to this chart[0] higher on the same survey report, JavaScript is the #1 most used, and Python is #3. But, I don't see this as a contest... being "the most popular" programming language doesn't automatically make it the best choice for a given task. [0]: https://survey.stackoverflow.co/2024/technology#most-popular-technologies https://survey.stackoverflow.co/2024/technology#most-popular...
- throwawaymaths 2y agoyou forgot to add TS and JS together
- arrowsmith 2y ago"Get used to it" doesn't mean "like it" or "prefer it". I've gotten used to a lot of things that I'd rather not have to deal with.
- more-nitor 2y ago> people just get used to it it's not just a matter of preference -- "no-curly-brace" dogma means it's impossible to do multiline lambdas in python
- worthless-trash 2y agoThis doesn't seemed to have affected pythons growth and popularity.
- more-nitor 2y agohmm isn't python's popularity mostly from ML libraries? you have to see ruby's popularity to see whether "it's despite or because of"
- troupo 2y ago> How on earth do you prefer tabs to curly brackets?!?! In general, how is significant whitespace both a thing, and popular?
- agumonkey 2y agoi don't mind as long as it's simple and regular (python is ok for instance)
- dartos 2y agoPersonally, I think using invisible, editor dependent characters is neither simple nor regular.
- agumonkey 2y agoi kinda agree but in practice it stopped being an issue 25 years ago
- troupo 2y agoIt didn't stop being an issue 25 years ago. Python of course still has invisible issues like silent invalid identations in `if` clauses, for example. Well, you could fix those with copious amounts of tests, of course. Same goes for YAML where invalid identation can will still be easily valid YAML.
- agumonkey 2y agothe honest amount of time I had syntactic issues with python in 10 years was 1.5 (my emacs removes whitespace between methods which made an admin unable to binpaste it directly on a remote machine) never once did we (and I have some bad apples at work) hit a problematic indentation in conditionals or other structs i'm honestly surprised
- dartos 2y agoYeah we’re just bike shedding here ;)
- fire_lake 2y agoIt’s quicker to move code around with whitespace because you can just tab it in and out, move lines etc. The best solution is to ban tabs entirely from the syntax - only allow spaces in multiples of 2.
- dartos 2y agoI can’t agree with that. Curly bracket blocks are obviously visible at a glance. If I incorrectly move one around it’s obvious. If I shift tab a section of python code around, I may be breaking an if state without noticing if I didn’t pay attention to a specific colon on one line. Imo s-expressions are the easiest to move around, but have the same issue of being hard to scan as tabs.
- fire_lake 2y agoWhitespace works better in the context of statically typed functional programming, I’ll give you that!
- lylejantzi3rd 2y agoIt's easier and quicker to move code around with braces when you're using vim. Vim has motions for selecting, editing, copying, etc everything between two braces. Without the braces, it makes moving that code around much more difficult, and error prone.
- lawn 2y agoAlthough I agree in general you can configure capture and move to be whitespace sensitive, for example by relying on tree-sitter.
- AsthmaBoy 2y agoI like to structure my code as an outline. Helps readability, quick visual hint of structure and i don't have to keep track of open-end brackets. Though i much prefer spaces to tabs.
- sheepscreek 2y agoReadability? It is crucial for indicating which code belongs to specific blocks to help the compiler/interpreter and humans alike. There are primarily two methods for structuring code to achieve this: rigid indentation rules, as seen in Python, or the use of brackets. Elixir and Ruby use end blocks, which essentially serve as a substitute for curly braces. Similarly, when considering JSON versus YAML or TOML for human readability, the same principles apply. Personally, I find indented code more readable, but this can be easily attained in most languages with universal code formatting rules and intelligent code editors that highlight different elements to improve readability.
- gumperbumper 2y agoMy biggest issue with tabs over curly braces is that it makes copy / pasting code insanely difficult. That alone makes tabs a bad choice.
- dartos 2y agoIt’s crazy that we have totally opposite views here. I find code block which are delineated by brackets so much more readable than ones delineated by invisible characters. Especially at a glance I don’t love do..end either, but still prefer them to arguing with Python about the level of indenting not being correct or that spaces were used somewhere somehow. > this can be easily attained in most languages with universal code formatting rules and intelligent code editors that highlight different elements to improve readability. Ofc, none of this is a practical issue, but that’s what makes it a fun topic of discussion ;)
- lolinder 2y agoWhy not both? Approximately no one uses braces without indentation, and that's trivially enforceable with a code formatter. But I personally find that the redundant signal of the braces makes things much more readable than in the languages that lack that redundancy! Every human communication mechanism includes deliberate redundancy to ensure that the meaning gets through even in suboptimal situations. Programming languages are somewhat unique in having a strong movement towards eliminating all redundancy.
- sodapopcan 2y agoGotta love that this comment has the most replies :D I don't understand how people prefer curly braces, a character that is almost always has other meanings within the same language, instead of something like `end`. To that (ahem) end I don't understand how people prefer `end` to the exceptionally clear `endif`. Turns out different people have different preferences :D
- dartos 2y agoIt’s always a fun little, largely meaningless, bike shed. ;) I don’t understand how people prefer invisible characters which change sized depending on the editor to visible ones which are consistent and easy to scan for.
- sodapopcan 2y agoOh boy there is a whoooooole fun thing on that here: https://github.com/prettier/prettier/issues/7475 https://github.com/prettier/prettier/issues/7475 And ya I also don't appreciate having to care about formatting for my code to compile and not being able to put debug statements at column 1 so they stick out like a sore thumb, though I suppose the solution to the latter is to stop being a puts/print debugger but, like... no :)
- deleted 2y ago[deleted]
- GiorgioG 2y ago> First and foremost, their statement about community on their homepage spoke to me This will probably get me downvoted to hell, but here goes anyway. You know, sometimes I just want programming stuff to be about programming. If I want social justice I will go to the appropriate place. No I don't support Nazis or the like, but there's a shitload of other types of discrimination/injustices that I (and most others) also don't support, that we don't see plastered everywhere.
- mvdwoord 2y ago[flagged]
- graemep 2y ago[flagged]
- frizlab 2y agoFully agree
- arrowsmith 2y agoFWIW, it's not just the "community statement" - the creator of Gleam is very unshy about his politics. Just take a glance at his social media. He has every right to do so, obviously, and I'm not telling him to stop. But if you want a programming community that keeps its politics separate from work, Gleam is not for you.
- arresin 2y agoIt’s not for me.
- kubb 2y ago> This will probably get me downvoted to hell In my experience the people who get irked by public support for groups suffering from hate always have this persecution complex, like they're going to be subjected to the same treatment as the members of these groups that they don't like to see being defended. People have a platform, and they use it to show they views. Elon does nazi salutes, Louis says trans rights. They express what they believe in.
- cies 2y agoI like all these langs that bring stricter typing to ecosystems that do not traditionally have very strict typing. Gleam for BEAM (Erlang), Kotlin/Scala for JVM (Java), Elm/PureScript/TypeScript for JS engines, Borgo for Go. Life's too short for runtime errors.
- frabcus 2y agoPyright with Python is lovely too!
- lolinder 2y ago> First and foremost, their statement about community on their homepage spoke to me This is the part of the excitement around Gleam that gives me pause. When the biggest draw is the heavily-moderated community [0], it seems almost more a political project than it does a technical one. That's not a bad thing in and of itself—goodness knows we need less toxicity in the world—but I get very nervous around a technical project that has gotten very comfortable with silencing dissent and enforcing "good vibes". I think of dang's bio quote: > Conflict is essential to human life, whether between different aspects of oneself, between oneself and the environment, between different individuals or between different groups. It follows that the aim of healthy living is not the direct elimination of conflict, which is possible only by forcible suppression of one or other of its antagonistic components, but the toleration of it—the capacity to bear the tensions of doubt and of unsatisfied need and the willingness to hold judgement in suspense until finer and finer solutions can be discovered which integrate more and more the claims of both sides. It is the psychologist's job to make possible the acceptance of such an idea so that the richness of the varieties of experience, whether within the unit of the single personality or in the wider unit of the group, can come to expression. [1] Marion Milner, 'The Toleration of Conflict', Occupational Psychology, 17, 1, January 1943 [0] The lead dev has been known to tell people off in DMs for reacting with negative emoji to their discord comments (and remove the negative reactions with admin powers!): https://news.ycombinator.com/item?id=41413735 https://news.ycombinator.com/item?id=41413735 [1] https://news.ycombinator.com/user?id=dang https://news.ycombinator.com/user?id=dang
- okkdev 2y agoNot tolerating intolerance shouldn't be political.
- lolinder 2y agoAs many are fond of saying these days, everything is political, whether it tries to or not. But what makes me say this is a political project more than a technical one is that consistently, as in TFA, the thing people say draws them to Gleam is this statement on the home page. And again: lpil has explicitly said that they're not stopping with intolerance, they enforce "good vibes". That's what I'm worried about on a practical level: I don't believe you can build a healthy technical community that solves real problems on that foundation. I very well might be wrong, and I believe that that's the point of this political experiment. But I also think it's important to emphasize that that's what this is: a political experiment, not just a programming language.
- jumpman_miya 2y ago[flagged]
- zellyn 2y agoWow. I invite everyone to go actually read the Gleam’s homepage: https://gleam.run/ https://gleam.run/ After reading the discussion here, with our poor community being “blinded by pathetic posturing” and such, I was expecting some kind of political polemic plastered over everything. Here’s the sum total of everything that could be considered political from the page: Friendly As a community, we want to be friendly too. People from around the world, of all backgrounds, genders, and experience levels are welcome and respected equally. See our community code of conduct for more. Black lives matter. Trans rights are human rights. No nazi bullsh*t. Which part of that can you possibly find objectionable? It seems the mere mention of anything political is seen as a transgression somehow. Like, Can’t we just go back to pretending we’re entirely apolitical, while the technologies we build reshape the political landscape of the entire planet?
- lolinder 2y agoSince I'm assuming you're at least half replying to me: I'm not objecting to any single part of that. I'm speaking of interactions I've had with the lead dev on this forum (linked in my comment) where they explicitly said that they don't stop at that and don't see any problem with enforcing "good vibes" on their community (their words), in a discussion that started with someone complaining that said lead dev had removed a negative emoji reaction that they had received on one of their own comments. Take the politics any way you like, I don't think you can build a healthy technical community that will solve problems in a healthy way under an admin who is casual in removing expressions of dissent about their moderation practices, justified under a policy as vague as "good vibes". https://news.ycombinator.com/item?id=41413735 https://news.ycombinator.com/item?id=41413735
- felixgallo 2y ago[flagged]
- GregSanders01 2y ago[flagged]
- dang 2y ago"Please don't pick the most provocative thing in an article or post to complain about in the thread. Find something interesting to respond to instead." https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html