tag:blogger.com,1999:blog-6577188874632264829.post4754973554779353390..comments2021-10-25T19:05:18.611+10:00Comments on My Hacking Journal: Moral dilemmaKristian Domagalahttp://www.blogger.com/profile/01334114225292145389noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-6577188874632264829.post-32347098229406967692009-04-28T12:50:00.000+10:002009-04-28T12:50:00.000+10:00The next entry I referred to in my previous commen...The next entry I referred to in my previous comment can be seen <A HREF="http://kristian-domagala.blogspot.com/2009/04/using-type-system-for-discoverability.html" REL="nofollow">here</A>.Kristian Domagalahttps://www.blogger.com/profile/01334114225292145389noreply@blogger.comtag:blogger.com,1999:blog-6577188874632264829.post-65117357385660241402009-04-14T12:56:00.000+10:002009-04-14T12:56:00.000+10:00@Chris, thanks for taking the time to clarify your...@Chris, thanks for taking the time to clarify your point. I don't have much of a physics background, so unfortunately the waves example you gave was a bit lost on me.<br /><br />I fully intend to expand on my assertion that, when you know the abstractions, some redundancy that looks incidental to begin with, can indeed be avoided. The example I have in mind covers the similarities between the Null Object "pattern", exception handling and list processing. Previously I don't think I would have made any connection between these seemingly disparate aspects of programming, but now that I know of the common abstraction over them, I have no need to repeat myself in a language that supports the abstraction.<br /><br />Regarding your comment on readability and verbosity, I certainly agree that they are caused by limits of the language I am currently required to work with. However, I disagree that meta-programming in dynamically typed languages is the answer to my problems; it may solve some problems, but IMO, it comes at a huge cost.<br /><br />This is actually the subject of the long overdue entry I'm currently working on in this series, so if you can wait a few more days, you can read more on my experiences with dynamically typed languages and why I think the cost far outweighs the benefits of using them.Kristian Domagalahttps://www.blogger.com/profile/01334114225292145389noreply@blogger.comtag:blogger.com,1999:blog-6577188874632264829.post-61492678856681422312009-04-11T01:31:00.000+10:002009-04-11T01:31:00.000+10:00As the author of the blog post in your footnote, a...As the author of the blog post in your footnote, allow me to clarify that what I mean by "incidental redundancy" is redundancy that arises from the similar form that different problems may take, but for which it is not useful to make a generalized abstraction. For example, light waves and ocean waves follow some very similar rules. But you wouldn't want to take a general approach that shields you from the specifics of each, because it actually hinders you in most cases from drawing useful conclusions. When working with light waves, you CARE that they are light waves, and not some other kind of wave. So don't worry that other waves have similarities. Work against the light waves, not the general waves.<BR/><BR/>I think the readability and verbosity problems you describe are more likely "language smells": hints that you are reaching the edges of the abstractive power of the language in which you are working. Meta-programming solutions, such as code that relies on reflection in C#, are examples of this. Reflection is a way of doing meta-programming in a static language. Code that uses reflection is often quite nasty stuff, unintuitive and hard to read. The details of the framework are too "noisy", and work against the goal of elegance in a solution that uses the framework. A path to more elegant meta-programming solutions is to use a language that has dynamic/duck typing (even if it's just VB.NET). You'll be amazed how much less noise there is.Anonymoushttps://www.blogger.com/profile/13199328747453354231noreply@blogger.com