News for hackers. Stuff that matters.
Re:Diminishing returns of static typing by fulafel on Monday October 02, 2017 @02:11PM (#15386310)
What makes you put Python and JS in the same basket here? Python is widely raised as a language that has a good dynamic typing system with strong types and good type error handling - arguably better than Lisps (nil punning). JS is infamous for the opposite. Macros are quite orthogonal to this.
Re:Diminishing returns of static typing by nnq on Monday October 02, 2017 @03:58PM (#15387387)
> Macros are quite orthogonal to this.

You ain't gonna to find any sane way to combine macros with a powerful type system in a way the doesn't make a 140+ IQ a requirement for any programmer touching the code using these features in a real world project...

Problem with programming language design is that the ideal/Nirvana solutions lie at the edge, or beyond, the limits of human intellect. If you want something that can be learnt and understood with reasonable effort (like in not making "5+ years experience" a requirement for even basic productivity on an advanced codebase), you're going to have to compromise heaviliy! The most obvious ways to compromise are throwing away unlimited abstraction freedom (aka "macros"), or type systems.

Sorry to break it to ya, but we're merely humans, and not that smart...

Re:Diminishing returns of static typing by pkd on Monday October 02, 2017 @04:16PM (#15387529)
There is a programming language property called Restrictability - it means that you only need to know a subset of the features the language provides to become productive. The best languages have high restrictability without compromising on the high level features like powerful macros.

The point of having macros is that they allow you to solve problems that cannot be solved elegantly in any other way. But 95% of programmers don't need to solve such problems and can do very well without using macros.

Re:Diminishing returns of static typing by nnq on Tuesday October 03, 2017 @04:40AM (#15391035)
> Restrictability - it means that you only need to know a subset of the features the language provides to become productive

Thanks, but.... NO THANKS! It's basically what makes languages like Scala or C++ horrible - a false sense of "you only need to know this subset of the language" and then you see that in real life: (1) nobody agrees on what that subset is and (2) you are going to have to hack your way through the most advanced frameworks and libraries (written by folk way smarter than you) and you are going to need to do it under unreasonable time pressure!

If a feature exists in the language you will be forced to understand it and become proficient at using it, whether you like it or not. Otherwise you're a "play pen programmer", only comfortable in his little patch of expertise.

I'm personally an "Expert Generalist" and like to be confident I can hack my way through anything this shitty life throws at me ;) This is kind of why I'm starting to love forcefully minimalistic, abstraction-wise-rigid, and intentionally "retarded" languages like Go nowadays :) (But yeah, when dynamic is the way to go, I'd prefer a Lisp with macros any time - one extreme or another, never the middle way, I'm not smart enough for it.)

Re:Diminishing returns of static typing by kazinator on Tuesday October 03, 2017 @02:40PM (#15394870)
> it means that you only need to know a subset of the features the language provides to become productive.

That only works when you work by yourself (or in a small team to whom you can dictate the language subset), and without any third party code.

> But 95% of programmers don't need to solve such problems and can do very well without using macros.

Languages that have great macro systems use them to bootstrap themselves. So when you use the standard, documented features, you're using macros.

E.g. if you're writing in Lisp and your file begins with (defun ..., you've just used a macro.

Re:Diminishing returns of static typing by pkd on Wednesday October 04, 2017 @03:44PM (#15403846)
Sure, you can use them as a consumer all the time, but that doesn't mean that you need to write your own to program in Lisps, for instance. For the few that do need it, it's a worthy tool to have.
Re:Diminishing returns of static typing by fulafel on Monday October 02, 2017 @05:24PM (#15388089)
Rust has macros that seem well liked, and everyday stdlib constructs are implemented using them. Though I can easily believe that the average Rust macro is authored by a smart person.
Re:Diminishing returns of static typing by flavio81 on Monday October 02, 2017 @03:28PM (#15387112)
>What makes you put Python and JS in the same basket here?

I'm very well versed in Python (i've delivered two financial software systems done in Python, written entirely by yours truly). However its features and facilities pale in comparison to the languages i listed in camp "D".