9 ms·
Python, but good.
by manojlds 2mo ago
Python, but good.
- swiftcoder 2mo agoI mean, it feels like "Python, but aiming at a completely different vertical that values native compilation and a borrow checker"? Which is not quite the same thing
- steve1977 2mo agoSo, without significant indentation?
- tyre 2mo agoOh nooooo, they fucked it up too. Why would someone make a language that’s whitespace sensitive? It’s confounding.
- mplewis 2mo agoIt's really not that bad
- syrrim 2mo agoWhy would someone make a language where the programmer and the interpreter have two different ways of figuring out where blocks start and end?
- ioasuncvinvaer 2mo agoat the closing curly?
- BeetleB 2mo agoTo weed out programmers who don't indent.
- deleted 2mo ago[deleted]
- grim_io 2mo agoI never understood this. What kind of special whitespace requirements do people have?
- pansa2 2mo agoI like significant invitation, but I still wouldn’t choose it if I was designing a language today. Functional-style programming has become much more popular since Python was designed in the 1990s, and there doesn’t seem to be a good way to have Python-like significant indentation and also support true anonymous functions.
- maleldil 2mo agoHaskell has significant indentation and anonymous functions.
- ameliaquining 2mo agoHaskell's significant indentation is, in my experience, much worse than Python's at fading into the background by matching what you would have done anyway.
- winding 2mo agoAs I understand it, Mojo’s goal is to be able to match state of the art performance for parallel algorithms and be able to use the exotic GPU hardware. A functional style is not necessarily productive in that context. One interesting PL concept they implement are linear types https://mojolang.org/docs/std/traits/anytype/AnyType/ https://mojolang.org/docs/std/traits/anytype/AnyType/
- jampekka 2mo agoScala 3, F#, CoffeeScript, Nim, Haskell, Elm, PureScript...
- pjmlp 2mo agoTrue anonymous functions has nothing to do with indentation, ML derived languages are also indentation based. Guido doesn't want them in the language, as simple as that.
- pjmlp 2mo agoLike with array base indexes, there are plenty of languages that start with something other than zero, and many that use indentation, including a few well known in hacker circles, Python isn't alone.
- Fraterkes 2mo agoSignificant indentation is why people love python. Can 2 billion people be wrong?
- ioasuncvinvaer 2mo agoyes
- deleted 2mo ago[deleted]
- ekianjo 2mo agoyes the majority is often very wrong
- steve1977 2mo agoI could get started about religions now...
- usef- 2mo agoWhen has it ever been an issue in use? People complained about this in 1999 but then I used it and it's never mattered.
- dgellow 2mo agoIt’s an issue when generating python, I can tell you from experience. It’s also a pain to not be able to safely rely on an auto formatter
- usef- 2mo agoEvery python developer I know uses an auto formatter today, and never needs to think about it (ruff, black). It's not ambiguous and is immediately visible if something has the wrong indent. (On other projects, I often wish other languages had formatters as good and standard as the Python ecosystem. I have many complaints about Python but whitespace is just not a problem I've seen)
- dgellow 2mo agoYou missed the point. I’m well aware python has formatters, I use them and implemented my own. The point was that when generating/manipulating python code you cannot just generate in whatever format then run a formatter. you need to carefully keep track of the exact indentation at place where the code in written
- usef- 2mo agoFair. That is a very slight friction on what is quite a small niche, though (compared to the wider ecosystem of developers). And most that need similar will use AST or runtime construction. The trivial kind of raw source generation is still trivial, but I'm guessing you're doing embedding/templates or something?
- dgellow 2mo agoIt’s definitely niche!
- dimator 2mo ago2026 and still talking about python indentation? what's next, `goto` gripes?