Hacker News new | ask | show | jobs
by mapcars 15 days ago
Readable syntax with mandatory indentation is a very questionable idea. For me its easier to understand that something ends with a specific designation, not with a lack of it. Indentation should be solved by formatter and not the language.

And I don't quite understand the memory model, is it something similar to Rust?

2 comments

That's more of a compiler limitation that became cultural for a while. Most languages (both natural and artificial) use delimited structures sparingly and rely more on other cues. It sometimes appears spontaneously (e.g. "∫ dx f(x)" is logically fine, but feels wrong) but in general it's rare.

The move away from indentation in programing came as a rebellion against the too-constraining fixed column languages, in the interval between punched cards and python, with a brief resurgence in the early blink tag and font potpourri web era. These days, it's perfectly reasonable.

In my experience there are many problems with significant whitespaces, things like copying pieces of code require much more work, when indentation actually changes the logic you can not ask your tool to do it automatically - because there is no single right way to do it. Tabs vs spaces can also be a problem.
> copying pieces of code require much more work

IME, it requires less work. You just grab the piece of code you want, whereas with braces, you need to count which closing brace is the correct one.

No, significant whitespace today is still terrible, coming from Haskell, Python and Go (newlines that break expressions unreasonably)
Apparently the truth hurts.

I can't believe that the claim "python-style syntax is perfectly reasonable" deserves to be down-voted into the basement.

The memory management model is automatic reference counting, with some optimizations, such as perseus for compile time reference counting where possible, and copy-on-write at runtime.