News for hackers. Stuff that matters.
Re:Are dynamic languages going to replace static languages? ... by dgb23 on Wednesday August 04, 2021 @05:18AM (#28058903)
They are dynamic to a degree that facilitates interactivity and expression on a different level than one might be used to. Late binding, REPL, expression based, building up code while it is running without losing state etc.
Re:Are dynamic languages going to replace static languages? ... by DaiPlusPlus on Wednesday August 04, 2021 @05:40AM (#28059052)
But none of those things you mentioned are dependent on a dynamic type system: on the contrary, plenty of statically-typed languages offer late-binding, expressions (certainly enough to implement a REPL) - I know C# certainly has all of those things.

The last thing: being able to edit program code, add new types/members/functionality and so-on while it's running... that's not really a language limitation nor typing-system limitation either: that's just good tooling that is able to hot-swap executable code after the process has already started. Visual Studio has had "Edit & Continue" in debugging sessions for almost 3 decades now, and the runtime build system used by ASP.NET means that source code and raw aspx/cshtml views can still be FTP'd up to production and just work, because .NET supports runtime compilation.

------------

For ordinary business software, where the software's focus is on data-modelling and data-transforming-processes, so all these programs basically just pass giant aggregates of business data around, so strong-typing is essential to ensure we don't lose any properties/fields/values as these aggregate objects travel through the software-proper. In this situation there is absolutely no "expressiveness" that's could be gained by simply giving up on type-correctness and instead rely on unit tests (and hope you have 100% test coverage).

Re:Are dynamic languages going to replace static languages? ... by simiones on Wednesday August 04, 2021 @09:35AM (#28060837)
> that's not really a language limitation nor typing-system limitation either: that's just good tooling that is able to hot-swap executable code after the process has already started.

It's more complex than that. The language absolutely has to define these operations for them to make any sense. Modifying some code inside a function is the easy case, and supported by many environments. Modifying types is much more difficult, and usually not supported (.NET and JVM do not support any kind of type modification - neither field nor function). I'm not sure if the C++ debugger can handle this either. Common Lisp can do it, and it actually defines how existing objects behave if their type changes.

Re:Are dynamic languages going to replace static languages? ... by capableweb on Wednesday August 04, 2021 @06:50AM (#28059507)
> For ordinary business software, where the software's focus is on data-modelling and data-transforming-processes, so all these programs basically just pass giant aggregates of business data around, so strong-typing is essential to ensure we don't lose any properties/fields/values as these aggregate objects travel through the software-proper.

There is also ways of dealing with this in dynamic languages. For example, Clojure has clojure.spec that achieves the same results, but without relying on strong typing.

In the end, it's all tradeoffs. There is no "one solution" that will be perfect for everything.

Re:Are dynamic languages going to replace static languages? ... by Zababa on Wednesday August 04, 2021 @06:20AM (#28059303)
REPL and expression-based are not limited to dynamic languages. REPL-oriented programming as it's understood by Lisp/Clojure users might be, I'm not sure.
Re:Are dynamic languages going to replace static languages? ... by cutler on Wednesday August 04, 2021 @07:43AM (#28059820)
Only Lisps have a reader so I'm not sure the term REPL is accurate with other languages. Interactive console != REPL.
Re:Are dynamic languages going to replace static languages? ... by draegtun on Tuesday August 17, 2021 @08:41AM (#28209203)
Rebol / Red also have a reader though in its terminology it could be called a "loader". See LOAD function - http://rebol.com/docs/words/wload.html
Re:Are dynamic languages going to replace static languages? ... by Zababa on Wednesday August 04, 2021 @09:21AM (#28060705)
Could you expand on that? I've searched a bit but the Lisp read doesn't sound too different from what other languages do.
Re:Are dynamic languages going to replace static languages? ... by capableweb on Wednesday August 04, 2021 @09:44AM (#28060917)
This is probably the best blog post I've seen on the topic:

https://vvvvalvalval.github.io/posts/what-makes-a-good-repl....

> If you're not familiar with Clojure, you may be surprised that I describe the REPL as Clojure's most differentiating feature: after all, most industrial programming languages come with REPLs or 'shells' these days (including Python, Ruby, Javascript, PHP, Scala, Haskell, ...). However, I've never managed to reproduced the productive REPL workflow I had in Clojure with those languages; the truth is that not all REPLs are created equal.

Basically, the "REPL" you usually call a REPL is in fact a shell, and not a REPL as normally used in lisp languages.

Re:Are dynamic languages going to replace static languages? ... by kbelder on Wednesday August 04, 2021 @05:10PM (#28066358)
I think FORTH has something very similar to the lisp REPL, if I'm understanding it properly. I know little of lisp, but everything I've read makes it seem that it and FORTH are almost evil twins of each other. Opposite but equal.
Re:Are dynamic languages going to replace static languages? ... by Zababa on Thursday August 05, 2021 @05:01PM (#28079755)
Thanks, from what I understand the difference I made between having a REPL and being able to do REPL-driven development is the one you make between a shell and a REPL.
Re:Are dynamic languages going to replace static languages? ... by simiones on Wednesday August 04, 2021 @09:41AM (#28060891)
Unlike most languages, Lisp defines how strings can be transformed to Lisp ASTs (s-expressions). In Scheme (which doesn't allow reader macros) this is a safe operation: you can read untrusted input without worry.

By contrast, most other languages only have eval() - which takes a string and parses and executes it as code. In Lisp, eval() takes a Lisp list object and executes that.

Re:Are dynamic languages going to replace static languages? ... by draegtun on Tuesday August 17, 2021 @08:44AM (#28209221)
Ditto for Rebol & Red.

For eg.

  >> code: load "foreach n [1 2 3 4] [print n * 2]"
  == [foreach n [1 2 3 4] [print n * 2]
  ]

  >> type? code
  == block!

  >> do code
  2
  4
  6
  8