News for hackers. Stuff that matters.
Re:Ask HN: What Happened to Elm? by satvikpendem on Friday February 10, 2023 @07:09PM (#34747914)
I learned OCaml in college and I would not liken it to Python at all. Python is very easy to grasp since it's basically pseudocode, but OCaml, for example, is based entirely on recursive constructs (yes, imperative versions exist but only as a last resort). It's an entirely different way of thinking. The syntax therefore also looks unfamiliar, coming from `for` loops in Python.
Re:Ask HN: What Happened to Elm? by hayley-patton on Friday February 10, 2023 @07:27PM (#34748058)
Whose pseudocode? I have not once written pseudocode that looks like Python, though apparently this is odd. In high school pseudocode was BASIC with structured control flow.

I tend towards pseudo-SML for scribbling things; once got in trouble for using "language specific constructs" like map() for university work. They weren't a fan of APL for adjacency matrix munging either, though that's how I went through that part of the course. In either case pseudocode is just ignoring the unpretty parts of any language, and it can hardly be said any language is more like pseudocode.

Re:Ask HN: What Happened to Elm? by satvikpendem on Friday February 10, 2023 @07:32PM (#34748087)
> I have not once written pseudocode that looks like Python, though apparently this is odd.

Well, looks like you're an outlier. Most people I know who write pseudocode don't use filters, folds, maps or APL like constructs either, even though I totally would when writing the actual code. They write it in a Python-like format with for-loops and if-statements.

Re:Ask HN: What Happened to Elm? by bmitc on Friday February 10, 2023 @07:45PM (#34748217)
F# can be written nearly identically to Python if one so desires.