News for hackers. Stuff that matters.
Re:Show HN: Hacker News Clone – Clojure, GraphQL Learning Pr... by boarnoah on Monday September 02, 2019 @12:06PM (#20859922)
Not very exposed to Lisp style languages. So take this as you will.

But the actual clojure code looks weird? I get that its a different way of writing from the C like syntax, just that fro a quick glance it doesn't look very pleasant to read due to the how messy the brackets everywhere nature is.

I also feel like reasoning about CRUD problems is easier in a non functional way, but again no real experience with functional languages to say for sure.

EDIT: To illustrate with an example: In C# I can write LINQ using the lambda syntax for queries, however sometimes its useful to be able to break down complex queries into parts, step through with a debugger to follow the logic, don't see how the functional style of Lisp aids in doing any of that (at least not when writing it idiomatically).

Re:Show HN: Hacker News Clone – Clojure, GraphQL Learning Pr... by snazz on Monday September 02, 2019 @12:13PM (#20859975)
Most people new to languages with Lisp syntax find it difficult to read at first. At some point, it becomes natural to read and write it that way. More importantly, it becomes obvious how useful having a consistent and extensible syntax is to writing all sorts of things.

Eventually the C-style syntax feels “messy” because the symbols are used less consistently. At the same time, Lisps like Dylan transitioned to a more conventional syntax and can still maintain lots of the power that they got with S-expressions.

Re:Show HN: Hacker News Clone – Clojure, GraphQL Learning Pr... by dustingetz on Monday September 02, 2019 @12:35PM (#20860154)
Imperative code is structured with ; that terminate statements. var foo = 42;

Functional code is structured with () that composes function calls. foo(bar(42))

All else equal, composition has more interesting structure, which is very helpful for reasoning e.g. flow and dependency graph

Re:Show HN: Hacker News Clone – Clojure, GraphQL Learning Pr... by mbil on Monday September 02, 2019 @12:25PM (#20860071)
> its useful to be able to break down complex queries into parts, step through with a debugger to follow the logic, don't see how the functional style of Lisp aids in doing any of that

In Clojure normally rather than a step debugger one would use an editor with REPL integration to aid in exploring and developing program behavior. E.g. you may capture inputs to the function, and then quickly and iteratively decompose the function and evaluate the building blocks. This type of workflow is often called REPL-driven development.