If you have this problem you have probably been trained to be sloppy by compilers.
Dynamic Languages are Unmaintainable
61–70 of 71 posts
Re: Dynamic Languages are Unmaintainable
#62Earlier quoted context omitted.
I would also argue that you can get the benefits of a static type system with hardly any cost. Usually when people talk about dynamic vs static typing they imagine something like Ruby or Python vs Java, but there's no reason why you can't have a high-level, expressive language with static types. All you need is a sophisticated type-system and smart type-inference that works everywhere (not just locally) and you'll be…
OCaml, F#, Haskell all come to mind. Regarding total type inference, I am not sure though that any of those can do completely away without some manual type annotations. I still like to declare type annotations (especially in Haskell, the syntax in ML is a bit too ugly) for top-level functions.
Re: Dynamic Languages are Unmaintainable
#63Earlier quoted context omitted.
Eh, you'll have an annoying time putting a man on the moon with that attitude. But hey, your twitters will hockeystick better! It all depends on your problem domain--the cost of failure for certain things (pacemakers, telco software, car engine ECU code, and so on) may be much, much greater than the cost of being super retentive in your development.
Yes, it depends on the domain but outside a few industries (and low-level code) software isn't a life-or-death matter. Infrastructure is a different kettle of fish, while it might sometimes be a life-or-death matter, generally it's just safer to seek pure robustness here: monopolies with government connections do not need to fear losing competitiveness since they can (a) manipulate the rules of the market, and (b) bi…
Re: Dynamic Languages are Unmaintainable
#64Hey, you might not know this, but if you use a dynamic language with types you can actually use them to your benefit! I've wrote a system in ruby that does clean type checking when I want it to and it cleans up the code and tests a lot. Just because you're not taking full advantage of your language tools doesn't mean that "dynamic languages are unmaintainable"
How can you implement a static typing system in a language that is dynamically typed?
Re: Dynamic Languages are Unmaintainable
#65Earlier quoted context omitted.
>> don't have to write any tests at all That is, until you find out that your state-machine matches incorrectly on an input text file... >> maintenance is easy. ...and you are the only person your company can find to maintain your codebase. You're zero for two, my friend. :(
> ...and you are the only person your company can find to maintain your codebase. Why should this be? Plenty of companies have teams of functional programmers.
No reason.
Re: Dynamic Languages are Unmaintainable
#66Hey, you might not know this, but if you use a dynamic language with types you can actually use them to your benefit! I've wrote a system in ruby that does clean type checking when I want it to and it cleans up the code and tests a lot. Just because you're not taking full advantage of your language tools doesn't mean that "dynamic languages are unmaintainable"
How can you implement a static typing system in a language that is dynamically typed?
http://www.rubyfleebie.com/ruby-is-dynamically-and-strongly-...
Re: Dynamic Languages are Unmaintainable
#67Re: Dynamic Languages are Unmaintainable
#68Earlier quoted context omitted.
> when you've been running a long old calculation for 20 minutes and it chokes on a misspelled variable name. If you are writing C++, you can't hot edit and continue without re-compilation. With a scripting language and proper flow control, you can edit upon exception and resume.
> you can't hot edit and continue without re-compilation But with recompilation you can. watcom allowed stepping back during debugging as long as the operation was possible to revert. From there patching up the code to include a new version of the function shouldn't be that hard. Not sure if anyone's actually done it, but it's certainly not impossible. Ksplice works similar way if I'm not mistaken to do reboot-less k…
What happens if your binary is faulty?
Re: Dynamic Languages are Unmaintainable
#69Are so many bugs really caused by type problems? I run into type based errors in Python almost never. It is not hard to keep track of dynamic types, and takes the same effort (or less) than static typed programming. In both cases, you have to know what type you are working with, right? If you have this problem you have probably been trained to be sloppy by compilers.
Mind you, this is the sort of thing you usually discover quickly, but it's also the sort of thing that most other languages will catch at compile time.
Re: Dynamic Languages are Unmaintainable
#70Bad programming practices (which usually come from the business, in the form of unreasonable deadlines, untrained or unskilled programmers given high positions, and politically mandatory use of terrible legacy systems) are unmaintainable. I've seen static typing fall down just as hard when the developers weren't good. Static typing is right for some problems, but the idea that dynamic languages are inherently unmaint…
Example: Runtime wouldn't be able to give you a protocol between how two classes would communicate. Say your service object that handles authentication. You would have to write unit tests so the two classes involved would know how to respond to each other.