Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Dynamic typing never was in the interest of the human developer but in the interest of the lazy language designer.

This release looks interesting. Let's see how type annotations work out in real life and if people use them.



Why do you have to abuse people as lazy because they prefer a different typing discipline to you?


Yay lets argue again about types vs dynamic! I'm sure throwing another opinion on this older than time debate would finally settle things.


The fact that all dynamic languages have adopted some kind of static verification tool has settled the discussion.

It wouldn't be needed if unit tests were enough as it used to be sold.


The fact that all static languages are adding an Any type means the discussion is settled. Lol. How has this settled anything? You think Ruby devs from now on are all gonna use Sorbet or RBS? I highly doubt it. Some very unique companies like Shopify or Github, which don't really represent the average Ruby shop, may make a limited use of these tools. The vast majority won't.


>The fact that all static languages are adding an Any type means the discussion is settled.

They really aren't, though. No statically typed languages which started off as such, to my knowledge, have added an Any type (casting magic notwithstanding). You must be thinking of TypeScript and other "gradually typed" languages, where it's a necessity for interop with existing code.

The rest of your comment, unfortunately, does not really put forth any coherent argument, so I would tend to weakly agree with the parent comment.


Microsoft QuickBASIC was fully statically typed.

Its successor, Visual Basic, had a VARIANT type. Then VBScript was derived from that, and it was fully dynamically typed.


I meant C# dynamic type actually. So I was wrong to mention Any.


Which was added to support COM variant types as main goal, and as side effect of trying to make the CLR a good target for Python and Ruby, an effort that has mostly died and is kept around just for backwards compatibility.


Quick Google shows this thing is still being used, for quite a few use cases. Maybe it's not super popular but what do u base it dying out on? https://code-maze.com/advanced-csharp-dynamic-type/#whyusedy...


Its current support in .NET Core and closed issues with won't fix.

https://github.com/dotnet/csharplang/discussions/158


It's baked into the language and still used, so...

There was a real need/use case for it.


They add an "Any" type because they have no choice, what are you on about? You can't change a dynamic language to a statically typed language overnight. Or over a year. Or five.

You are not furthering your argument, you are just reasserting the status quo.


Actually they are catching up with Algol features.


Okay you convinced me to stick with my assessment of ruby. I regret every single time I have chosen to write something in ruby. I guess this release won't change that if nobody uses these features.


No, it won't. If you don't like it you don't like it, it's alright. I'm not trying to convince anyone to do anything most of the time, stick to what makes you happy and productive.


Then don't write in Ruby, write in what you want.


> The fact that all dynamic languages have adopted some kind of static verification tool has settled the discussion.

No, it hasn't.

The fact that there is utility to static type checking that is sometimes a net win so it is better, ceteris paribus, for a language to have it available does not “settle the discussion” about the claim that dynamic typing was pure lazy design that was never in the interest of human developers.


Type inference.


It was, back when all mainstream statically typed languages had atrocious UX and there really was no good example of a language with ergonomic typing. Even now, there are very few languages around which has that. The most ergonomic I know of is Crystal, which is not surprising considering its heritage.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: