Syntactic Confectionery Delight | |
PerlMonks |
Re^5: Interesting read: "Why I use perl and still hate dynamic language weenies too" (heterogeneous lists)by ikegami (Patriarch) |
on Apr 17, 2007 at 16:15 UTC ( [id://610570]=note: print w/replies, xml ) | Need Help?? |
(I meant to include this in my previous post.) One big difference is the ability to create heterogeneous lists with ease in untyped language. That allows us to create powerful general purpose functions. For example, compare
vs
I don't care so much about the difference in *code size*. The size is not that much different. (80% seems ridiculous.) In fact, the code is not that much different. The real difference is in the amount of *hassle*. Almost all of the extra code needed in a typed language is very repetitive. In order to hide the extra code and avoid more hassle, you end up creating (repetitive) special-purpose functions as shown below. Of course, this is a hassle as well.
Note: For the typed language, I used a mixture of C, C++, Java, Pascal and Perl that keeps the code as small as possible. Features include implicit type conversion, autoboxing, object allocation without "new", no separation of variable declarations and code, templates or generics, a Variant type, etc.
In Section
Perl News
|
|