KoRnholio
February 14th, 2008, 09:26 AM
So, I have an assignment coming up later this semester in a Theory of Computation class, and I'm looking for a language to learn by writing it. Writing everything in Java (what most people do for this assignment) is boring, and I like learning new languages.
The assignment is:
1. Parse any regular expression into an NFA (non-deterministic finite automata)
2. Convert the NFA into a DFA (deterministic finite automata)
3. Minimize the DFA
Currently I know Java, C, C++, PHP, ML, Lisp (actually learning this for another assignment this semester), and Prolog, so those are kind of off the table.
The languages I'm currently considering are:
1. Python
I've been wanting an excuse to learn this for a while, and I hear its both imperative and functional, which is a plus for me.
2. Perl
Seems like an interesting language. My rationale for including it on this list is that a lot of Perl code seems to include regular expressions. Of course that isn't logical at all, but if that means that programmers interested in computational theory gravitate towards Perl, then there might be some weight towards it in picking a language for this assignment.
3. Haskell
I've heard good things about this, but don't know much about it. If someone makes a convincing argument for using this, I may go for it.
4. I'm open to other suggestions, if a convincing argument is made.
So, I want input from people knowledgeable in computational theory to weigh in on this. Remember, I'm not casually learning this language for the hell of it, I'm learning it for a non-trivial computational theory assignment. I'm fairly interested in hearing from experts on the languages what reasons their language of choice would be well-suited for this application. I know it 'can' be done in any language, but any language features that help or hinder an assignment like this would be helpful to know.
Also, the fact that this is an assignment for a grade makes ease of learning a factor as well.
The assignment is:
1. Parse any regular expression into an NFA (non-deterministic finite automata)
2. Convert the NFA into a DFA (deterministic finite automata)
3. Minimize the DFA
Currently I know Java, C, C++, PHP, ML, Lisp (actually learning this for another assignment this semester), and Prolog, so those are kind of off the table.
The languages I'm currently considering are:
1. Python
I've been wanting an excuse to learn this for a while, and I hear its both imperative and functional, which is a plus for me.
2. Perl
Seems like an interesting language. My rationale for including it on this list is that a lot of Perl code seems to include regular expressions. Of course that isn't logical at all, but if that means that programmers interested in computational theory gravitate towards Perl, then there might be some weight towards it in picking a language for this assignment.
3. Haskell
I've heard good things about this, but don't know much about it. If someone makes a convincing argument for using this, I may go for it.
4. I'm open to other suggestions, if a convincing argument is made.
So, I want input from people knowledgeable in computational theory to weigh in on this. Remember, I'm not casually learning this language for the hell of it, I'm learning it for a non-trivial computational theory assignment. I'm fairly interested in hearing from experts on the languages what reasons their language of choice would be well-suited for this application. I know it 'can' be done in any language, but any language features that help or hinder an assignment like this would be helpful to know.
Also, the fact that this is an assignment for a grade makes ease of learning a factor as well.