4 ms·
Yus. Dynamically typed languages are expressive, quick and fun. But strict static typing is like a seat belt, it's annoying, but it just might save your life.
by sgt101 13y ago
Yus.
Dynamically typed languages are expressive, quick and fun.
But strict static typing is like a seat belt, it's annoying, but it just might save your life.
Also ceremony code is there for a reason; that reason is not to annoy you, it is to make sure that those who come after you know what it is that you have done and why.
Also: comments.
Also: documentation.
Also: UML.
- masklinn 13y ago> But strict static typing is like a seat belt, it's annoying, but it just might save your life. The problem with saying "static typing" without further precision is on one axis it ranges from C where the steatbelt is made of paper to ATS or Idris where the "steabelt" is a zero-zero ejection seat, and on an other axis it ranges from Java where you have to braid the steatbelt from raw fibers any time you sit down to MLs or Haskell where the seatbelt magically appears around you.
- seanmcdirmid 13y ago> MLs or Haskell where the seatbelt magically appears around you. Well, only if you don't need nominal subtypes.
- masklinn 13y agoYeah, conditions may apply, same for the other categories. Then again, we're (literally) in car-analogy land here so meh.
- DanWaterworth 13y agoHonest question; Could you give an example where you need nominal subtypes?
- seanmcdirmid 13y agoIf you like doing real object-oriented programming, then nominal subtypes are mighty useful.
- spacemanaki 13y agoWell here's another honest question: what's real object-oriented programming and where can I learn more about it?
- seanmcdirmid 13y agoThere is an entire lineage of real object-oriented languages with nominal types starting from the dynamically typed smalltalk (research on which where we learned H&M was horribly ill suited to OOP in the first place). Or if you prefer, just look at how you use your natural language to name things and reason about the world.
- acjohnson55 13y agoOn the other hand, so many people have abandoned the most common forms of OOP. See for example the story from yesterday [1]. Many writers have written about how brittle object hierarchies are in anything nontrivial, [2] for example. I will say though that newer models of OOP, focusing on interfaces and composability of behavior, seem to have quite a bit of steam left in them. [1] https://news.ycombinator.com/item?id=7618933 https://news.ycombinator.com/item?id=7618933 [2] http://raganwald.com/2014/03/31/class-hierarchies-dont-do-that.html http://raganwald.com/2014/03/31/class-hierarchies-dont-do-th...
- seanmcdirmid 13y agoDon't count OOP as being dead yet, the FP stuff is useful (I use it myself), but we have our own better abstractions coming out, like having more fun with mixin-style inheritance. The FP + OOP crowd is pretty vocal, I'll give you that.
- altcognito 13y agoThe problem with magic seatbelts is that all the tooling surrounding the magic has to know how the magic works as well.
- NAFV_P 13y ago> The problem with saying "static typing" without further precision is on one axis it ranges from C where the steatbelt is made of paper to ATS or Idris where the "steabelt" is a zero-zero ejection seat, and on an other axis it ranges from Java where you have to braid the steatbelt from raw fibers any time you sit down to MLs or Haskell where the seatbelt magically appears around you. Regarding C, it is weakly typed so it doesn't care whether you feed it apples or habanero chillis, the static type system isn't for safety, it's for improving compilation speed (which was often a big headache in the 1970's). It sticks with the methodology of C: if you make a mistake you pay for it dearly.
- camus2 13y agoDynamic typing is fine,what is not is type coercion and weak typing.But Dynamic vs Static is not the most important debate.
- deleted 13y ago[deleted]
- dllthomas 13y agoYou lost me at UML.