August 2007
5 posts
1 tag
Static Vs. Dynamic Typing
Static vs. dynamic typing. Here’s my ravings.
Being thoroughly trained in ML, I understand the benefits of static typing. Here are some claimed benefits.
Reduced CPU usage since types don’t need to be checked at runtime
Reduced memory usage since types don’t need to be stored at runtime
Other type-directed optimizations
Discovery of errors as early as possible, for...
You Can Only See...
It’s been a re-occurring idea recently that you can only see what you already know. How then do you ever get to see the things you don’t know?
It seems you just have to force yourself. You have to push yourself and trudge through it. Just dive in even though you don’t feel comfortable with it. And force yourself to use, and thus learn, the new thing. It’s always...
A Strange Medium
Code is a very strange medium. Because of compilers, constructing a program is practically free once you unambiguously design it in code. But the design is constantly changing. It’s really like building a skyscraper. So many intricate details, all working together. If any one piece fails, it could cause the whole building to collapse. But somehow it all must integrate to form a coherent...
The Hard Test
It’s recently come to my attention that there are smart, capable programmers out there who are resistant to learning and/or using more powerful programming languages.
I have to admit, in hindsight, syntax can be a huge deterrent. The first thing I used to do when I saw Lisp’s parentheses was try to parse them like parentheses in other languages — basically implementing a stack in my...
ML → Scheme
I wrote my first real Scheme macro today. It was a macro to emulate ML’s pattern-matching.
Writing a type-checker in Scheme, I found myself writing all these list?, eq?, and let* expressions, making my code look way too complicated than necessary. All of that can be done simply and concisely with pattern-matching. For Lisp hackers out there that aren’t familiar with...
Seeing ML Clearly
I went to school at Carnegie Mellon. And there, the computer science department is big on research. For system-level programming, they use C. But for almost all theoretical or type related topics, they use ML. In particular, Standard ML.
So since I was really interested in compilers and type-theory, I became very familiar with ML. First how to use it. Then how to use it to make...