News for hackers. Stuff that matters.
Re:Nim version 2.0.0 release candidate by zozbot234 on Wednesday December 21, 2022 @07:54PM (#34088371)
Is syntax really that big of an obstacle to learning a first programming language? The semantics of a C-like language like Nim could hardly be more different to Python's, they're pretty much at opposite ends in the stack.
Re:Nim version 2.0.0 release candidate by TylerE on Wednesday December 21, 2022 @08:08PM (#34088478)
Nim feels much more like python than c to me, and the minimal number of non-alphanumeric characters in source is a big part of that.
Re:Nim version 2.0.0 release candidate by satvikpendem on Wednesday December 21, 2022 @10:17PM (#34089325)
> Is syntax really that big of an obstacle to learning a first programming language?

Of course. Compare, at the extremes, languages like APL or Brainfuck to something like Python or Scratch. Syntax is a huge factor in people wanting to learn to code or not.

Re:Nim version 2.0.0 release candidate by adalacelove on Thursday December 22, 2022 @02:31AM (#34090802)
Those languages have actually very different semantics too. I would say lisp is a better example of the importance of syntax.

People obsess (wrongly) about superficial details in my opinion.

Re:Nim version 2.0.0 release candidate by satvikpendem on Thursday December 22, 2022 @03:07PM (#34097950)
I know of an example first hand where syntax only mattered: OCaml vs ReasonML. ReasonML is merely a syntactic change from OCaml as it's simply OCaml underneath, but people, especially coming from web languages like Javascript, liked ReasonML more than OCaml and were more willing to use it.

Another example, Gleam (an Erlang BEAM based language like Elixir) [0]:

> Shot in the wind, but is there a plan for different syntax? For those who've become comfortable in different fp camps, I can't really see myself picking up curly brackets and C-style code again. I really like the idea(s) of this project, but it's the thought of staring at that kind of code that's just a bit too much. I'd rather do something like [Nim,Scala,Clojure,F#]->JS if I needed to have that.

> > Unlikely I'm afraid. We used to have an ML style syntax but once we switched to a more mainstream syntax we had a big surge in popularity and interest.

> > I am very fond of the ML syntax, but I think it is the semantics and type system that really matter, so I am very happy to sacrifice syntax in order to make Gleam more widely accessible.

[0] https://news.ycombinator.com/item?id=27063049

Re:Nim version 2.0.0 release candidate by isofruit on Thursday December 22, 2022 @04:29AM (#34091502)
It can be. I would've loved to pick up Rust, the patterns for code structuring etc. that are evolving from it seem interesting to me. But getting the syntax right is just fairly difficult compared to other languages and at some point you just lose your patience. At the same time there's not enough learning material that works for me to dive into the deeper contexts to make it "click" for me.

Contrasting that to my experience with nim, I could get going almost immediately and thus didn't get held up much with the basics, which gave me more time to dive into more interesting concepts that it provides, like templates, compile-time-evaluation (new for me as a pythonista back then), macros etc.. I still got stuck here and there, mind you, but that was for more complex question than "How do I get a config from place X without the compiler yelling at me", and the discord was very helpful for that.

Re:Nim version 2.0.0 release candidate by mikedelago on Thursday December 22, 2022 @09:13AM (#34093412)
Syntax is pretty much the entire reason that people stay away from languages like Erlang and Lisp
Re:Nim version 2.0.0 release candidate by kaba0 on Thursday December 22, 2022 @05:58PM (#34100072)
Or you know, types. Or too much expressivity.