17 ms·
Letter to a Young Haskell Enthusiast
- tekacs 12y agoIt's a shame this is titled to target Haskell developers - it feels like it would be a good read for most young developers. (though I can see how the endless feature-incorporating (typeclass-based) refactor cycle is particularly relevant to Haskell - come to think of it, I think many somewhat older Haskell developers could stand to take from this too)
- 300bps 12y agoYou're right - this letter fits perfectly with many languages. Letter to a Young Visual Basic 6 Programmer [...] So how do you help them want to learn it too? You do not tell them this is a language for smart people. You do not tell them you are smart because you use this language. [...]
- jimmaswell 12y agoI get the feeling you're trying to say something about VB6
- AnimalMuppet 12y agoIt's a good read for many older non-Haskell programmers, too. I'd go so far as to say it's a good read for many humans, whether they're programmers or not.
- bgilroy26 12y agoI think it addresses a "hotshot" mindset to some extent, but like you say, that applies to more than just Haskell programmers.
- egeozcan 12y agoI'm not a Haskell developer but the main idea in this article is big enough that it can be applied to any situation where you feel that you know better. Years pass and I always feel that I got rid of this "proving that I know better" motive but, every time I look back, I always see that I still acted with it and it was usually me who could do better. At the very least, I always feel that I could do better in the social area - like, communication.
- pestaa 12y agoNice attitude, that's for sure. However I feel like this is targeted at the open source community. At work, it sucks to be better, because I'll get the harder bugs, deeper work, more work, tough refactorings, architecture planning, and everything that programmers who can't even write decent PHP can't do.
- egeozcan 12y agoThere is something called "decent PHP"? Use Haskell! =) (This joke is so relevant that I couldn't resist!) Joking aside, my idea is that a job isn't good for one as long as you feel you aren't learning anything but rather covering for other people. Monetary compensation is not enough for these kind of situations because the programmers I know generally are motivated not just by money but equally from the sense of accomplishment as well. It's not about "confirming that you are smarter and know more" as discussed in the article but rather the very basic feeling of getting things done.
- mattgreenrocks 12y agoThis is something every young dev should know, Especially if you're a regular full-time employee. The job should do something for you! You may be paid well, but you must feel like you're getting something out of it too; and if you have any sort of intrinsic motivation you can't expect to be satisfied with just money. It may be on you to find out what that is, there's no guarantee it will be technical in nature. There are times when this won't be the case, though, and you'll need to grind.
- jib 12y agoI love getting that stuff. For me, the fun in work is to work on stuff that is hard and fix it and/or make it easy. I will work on easy stuff when it is necessary and stuff just needs to get done, and I recognise that a lot of work is about getting easy stuff done because value is often tied to tedium not to complexity, but to me the fun part is when value comes from making sense of the stuff that doesnt make sense currently.
- Nursie 12y agoThe 'hard' stuff is what I find stimulating! What sucks about being at the higher end of some teams is when other people come to you with trivial problems that they just can't be bothered to look into themselves. I'm happy to help people learn but I don't like being expected to do your job for you.
- amirmc 12y agoThis is a great article and the ideas go way beyond Haskell and programming. We are all still learning and our interactions with people can be much better if we remember that. In some sense, it also reminds me of the xkcd comic on learning new things http://xkcd.com/1053/ http://xkcd.com/1053/
- anmonteiro90 12y agoSo.. wise. Thanks for this, I'll save it to read every few months. This is something I always struggle against, but ends up coming to bite me sometimes. I also believe that there could be a more general version available for either/both: - other programming languages / paradigms; - other fields of research
- Dewie 12y ago... and other age-groups. Finding something that makes you feel "enlightened" and makes you want to preach a bit can happen at any age.
- roymurdock 12y agoThanks for taking the time to formalize your thoughts in such a clear and elegant manner. Everyone needs a periodic reminder to keep their ego in check. On the one hand it drives ambition, spurs achievement, and encourages personal development. There is almost unlimited power in the concept of self. Me against the world. My achievements. I think this attitude is very prevalent in programming and the tech world in general. It is manifested and reinforced by the wild popularity of startups (My idea is good and I can go it alone) and the tech visionaries (Gates, Jobs, Musk) who seem to carry the weight of the world on their shoulders. On the other, overfeeding your ego will make you narcissistic, selfish, insecure, and hostile. You will lose your empathy for others, and ultimately, your humanity, as you start to lose sight of the big picture: progress is a process that started long before your time and that will continue unimpeded to infinity, even after your infinitesimally tiny ego is wiped from existence. As Isaac Newston put it best: "If I have seen further it is by standing on the shoulders of giants."
- Zolomon 12y agoOut of topic: Hal Abelson has a fun quote to Isaac's, which I learned about from my calculus textbook (every new chapter began with a quote): "If I have not seen as far as others, it is because giants were standing on my shoulders."[1] [1] http://en.wikiquote.org/wiki/Hal_Abelson http://en.wikiquote.org/wiki/Hal_Abelson
- deleted 12y ago[deleted]
- Fede_V 12y agoI agree very much with your sentiment, but that quote by Newton is actually far more mean-spirited than you think. It was Newton making a huge burn about Hooke, one of his main scientific rivals, who was actually very very short. Newton was possibly the greatest intellect that humanity ever produced, but he was not a nice person.
- skj 12y agoApparently that is not so cut and dry. According to wikipedia (http://en.wikipedia.org/wiki/Standing_on_the_shoulders_of_giants#References_during_the_sixteenth_to_nineteenth_centuries http://en.wikipedia.org/wiki/Standing_on_the_shoulders_of_gi...), the letter with this statement was written at a time when they were on good terms.
- bilalhusain 12y agoMay be the reason I want to learn Haskell but it never embraces me back is that I enjoy snarky and condescending comments on HN.
- titanomachy 12y agoWe all have our vices.
- ankurdhama 12y agoIt happens with humans in general, probably one of the cognitive fallacies. Whenever we gain new knowledge, we get infatuated with it and for the period of infatuation we block out everything else. It could be any kind of knowledge gain - "Hey I know the shortest path to office and I don't care what path you take or suggest, mine is the best one". My message would be this: "It is amazing what we know or learned, but what is more amazing is the stuff we don't know yet - so be curious, not infatuated".
- vorg 12y ago> Remember also that they were put off by your actions, not by your existence Some people can be put off by your name, like when their primary interest is their product is marketing its name rather than the technical merits of the product.
- hibikir 12y agoI'll go against the grain and say that it's a pretty dangerous article. What it wants you to do, slay false statements and spread what you know, is exactly the kind of thing that goes terribly the minute you fail to figure out what is true and what is false. Very few things in computing are really black and white, but spending our time proselytizing just leads to more thinking in a black and white world, and adoption of technologies that might leads us in the completely wrong direction (Hello Spring!) What we have to tell a young language enthusiast is that there is much insight in ideas different than our own, and that there is much to learn in looking outside of what you consider the best. Maybe there are tools that are better suited for other kinds of problems. Maybe not everyone that disagrees with you is very wrong about things and needs to be converted. I mean, how can you even try to ask people to improve their communication skills, when you say that people that do not think programming is math is because they have the wrong notion of math?! I just don't see how you are going to convince anyone of anything with that level of condescension. Frankly, and being a bit meaner than I should, it seems to me that the reason Haskell can't catch on is precisely that enough of its community thinks like this.
- freyrs3 12y ago> I mean, how can you even try to ask people to improve their communication skills, when you say that people that do not think programming is math is because they have the wrong notion of math?! I just don't see how you are going to convince anyone of anything with that level of condescension. You're projecting a level of condescension onto Gershom's words that just isn't there and makes no sense within the context of the article. His point is that the "debate" about programming/mathematics is largely one of semantics and consists of well-intentioned people arguing from a different set of definitions. I'd hardly consider this to be a controversial statement, much less condescending.
- tragic 12y agoEr, isn't that the whole point of the article? "Every time we learn something new and want to share it, we face these issues all over again -- the desire to proclaim, to overturn received wisdom all at once -- and the worse the received wisdom, the more vehemently we want to strike out. But if we are generous listeners and attentive teachers, we not only teach better and spread more knowledge, but also learn more, and enjoy ourselves more in the process."
- Ono-Sendai 12y ago"It is not a language that is “more mathematical” or “for math” or “about math”. " I disagree, Haskell (and other functional languages) are a lot more similar to traditional maths than other languages.
- spopejoy 12y agoHmm ... Pedagogically, I wonder if Haskell suffers from this emphasis on math. For instance, I couldn't figure out State monad for the life of me, and in general how monadic calls could maintain a context "in the background". Explanations like "it's easy just follow the Kleisli arrows" weren't helping. Finally I did the exercise of manually "inlining" every >>=, 'get' and 'modify' call in a trivial example of a StateT function calling another StateT function. And then I got it. Truckloads of closures/continuations, constant calls to re-create the monad with new information. Function calls with functions as arguments that close over the previous calling function's state. A lot of this was specific to how StateT + Identity unwrapped; I'm sure inlining other monads would reveal different things, and unwrapping IO is impossible in GHC :). My point is, math has been a great source of Haskell's incredible expressivity, but the pedagogical focus on math threatens to mask it's greatest triumph in Haskell: making all of that boilerplate code go away with incredible precision and elegance. When you rip it open and see what >>= or 'do ... get ... modify' is doing, you feel the power. I feel like the article suggests this, too: The only thing you need category theory for is to take great categorical and mathematical concepts from the world and import them back to programming, and translate them along the way so that others don’t need to make the same journey you did. At least for advanced programmers from other worlds, they need to see the guts to appreciate how amazing this stuff is.
- codygman 12y agoSeeing lots of those monads unwrapped and the lambdas that they get turned into can be especially helpful for those of us (including me) that have an imperative/OOP background.
- fbernier 12y agoI think what followed this quote made quite a good job at explaining what exactly he meant with this statement: That people tend to have a limited view of math as calculus only.
- michaelfeathers 12y agoI like the Ruby version of this: "Matz is nice, so we are nice." http://blog.emmacodes.com/post/55841830917/minswan http://blog.emmacodes.com/post/55841830917/minswan Interesting to note how two different language cultures manage to say this.
- michaelochurch 12y agoI think there's a lot of value in this article (which really isn't about Haskell; but more generally about being in the top 5% of programming). I can't disagree with the idea that we should show more open-mindedness toward different approaches and civility to new entrants. That said, I'm going to take a different tack, not because the OP is wrong, but just to explore a second orthogonal component. As programmers, we have both a weak and a submissive tribal identity. That's a problem, and we should change it. I call it "weak" because we aren't good judges of who belongs and who doesn't. The true bad guys (and, yes, they are quite bad and we must oppose them) have been commoditizing engineering work for decades by flooding the market with low-skill, untrained, "software engineers" (ScrumDrones, CommodityJavaDevelopers, etc.) in order to reduce top talent's leverage in the market. It has created this mythology that talent and skill don't matter, and while it's completely wrong, the failures are delayed enough that the bad actors in the business can be promoted away from the problem until shit breaks. Our fatal flaw? Instead of striking the bad actors in the business world, we attack those low-skill engineers, who might be infuriatingly incompetent, but really didn't do anything wrong. ("You're just a PHP retard, so shut the fuck up.") The true bad guys don't really care what happens to the CommodityScrumDrones, and that's the point of having them is that they're disposable. By attacking them, the unskilled pawns, we gain nothing. Sure, they're incompetent and may be anti-intellectual (or, more likely, they just don't give a shit about programming and shouldn't be programmers, but aren't stupid or bad people). But the anti-intellectualism we must fight is that of the businessmen who are driving us in to the ground. I say it is a submissive tribal identity because this divide-and-conquer game works. Dysfunctional organizations and societies usually form three classes that matter. (There are subclasses within each related to prestige factors that don't matter.) The High must keep the Middle and Low at odds with each other, lest they band together and overthrow the High. In order to depress programmer wages and working conditions, the bad guys prevent professionalization and collective bargaining, create startup mythologies in order to make business bad actors look like real technologists, and flood the market with commodity programmers (the Low). Amazingly, the more skilled programmers (the Middle) will, driven by their disgust in sharing working conditions with the Low, actually work unreasonably hard and clean up their messes, just to out-compete them in a game that doesn't really matter (the unskilled are never fired, and the overworked are rarely promoted). When this works as designed, they turn into the Clueless layer of the MacLeod model. We have to fight the anti-intellectualism. We've let ourselves be typecast to business subordinates rather than technologists and it's goddamn fucking disgusting. When some businessman says "languages don't matter", we have to humiliate him for his stupidity and anti-intellectualism, before he feels empowered enough to start hiring commodity engineers. We do have to fight, and we have to get nasty, and we have to crush our enemies. But we also have to stop clawing at each other over petty differences (e.g. tabs vs. spaces) and focus on the battles that matter.
- VMG 12y agoIt starts out from kind of weird premise > Now, you’re a social person, and you want to go forth and share all the great things you’ve learned. And you have learned enough to distinguish some true statements from some false statements, and you want to go and slay all the false statements in the world. I learned some Haskell recently and I'm somewhat enthusiastic about it. It's a very difficult language, I took a lot of effort to learn Haskell compared to most other languages. It's still difficult to understand other libraries and code. But personally, For me, it was worth the effort to learn and understand it. I don't think it's worth the effort for everybody. I don't think it's fun for everybody. I don't think it's the best tool for everything. I have no desire to spread the good word. If you start from the premise that it's the best language out there, everybody should learn it and that it is easy, you'll get into trouble. Edit: I don't get the downvotes -- maybe I did not express myself clearly?
- munin 12y agoWhen you say "I don't think it's worth the effort for everybody", that's exclusionary, and totally counter the tone of the article, so I don't think your comment belongs in the thread about this article.
- VMG 12y agoSo the negation would be "Learning Haskell is worth the effort for everybody". I think it is arrogant to say that when there are thousands of skills to learn and a limited amount of time.
- munin 12y agoAnd it's not arrogant to say "it's too hard"?
- VMG 12y agoThat is not what "I don't think it's worth the effort for everybody" means. Some people have a greater return on investment improving their skills for a language they already know, learning a language that is not Haskell, or learning a skill that is unrelated to programming.
- fasteo 12y agotl;dr "Nothing is worse than active ignorance." Johann Wolfgang von Goethe
- innguest 12y agoHaskell just clicked for me not long ago after 4 years of revisiting it periodically, writing one-liners and small programs, and reading tons of material on it. All the tutorials in the world weren't helping it click for me. But then somehow I finally understood that Haskell is (trying its best to be) Math. I had a deeply mistaken idea of what math is and I thought I "hated" it and that any kind of advanced math is too hard for me. I have failed Calculus before, though I've always done well in discrete math. It was only when I realized that math begins (or does it?) with what you have (objects, sheep, anything you want to count) and what you can do with them (group, make a set, join two sets, etc). Then I went into a reading spree about all ofthose very basic and foundational aspects of pure math (pure as in "look around you, you can count things, you can group them based on some trait, you can do operations based on groups, you can now think of those groups as the entities to focus on, you can prove certain properties about those groups, etc") and I found it amazing that so much can be known and discovered from starting with just what you see around you. When I understood that math starts with just looking around you then I finally made peace with math, and I saw that it was good, that it was here to help me. Then I looked at Haskell again, and suddenly Void, Unit, Either, Maybe, they all made perfect sense. Maybe is a function that takes your set and gives you a new set that looks the same, but has a special entity that means "the lack of an entity in this set"; in other words, Maybe adds a zero to a type. It's simple and easy for me when I choose to see it that way. Everything is a lot more concrete and I have even drawn all these concepts and they map very well to visual ideas. So many things in Haskell are recurring themes (like adding a zero, starting things with a "one" entity, etc) that if you have a good relationship with math, many things fall into place just nicely. But I started Haskell hating math and that has held me back so much. So my advice would be to never deny that Haskell is math, but to explain what's so awesome about math, how it gives us so much certainty even if we only assume very basic and seemingly obvious statements. I could have used some rough advice like "listen, stop whining about math, you're wrong about what you think math is, it's much more fundamental and it's a tool to help you organize any set of ideas you have, so why would you not apply that to programming?"
- virtualwhys 12y agoInteresting, I have no background in higher level math at all (stopped after high school calculus), yet still am able to grok Either, Maybe, Unit, etc., as I'm sure is the case with any non-math head that happens to be a programmer. The difficulty I find with Haskell itself (setting aside FP basics that exist in many languages these days), is the math requirement. Why requirement? Well, it may be possible to use Haskell in isolation without knowing category theory and higher level math in general, but in the real world, Haskell libraries are in fact based on and assume a foundation in category theory and general understanding of higher level math (see the uber popular Lens library, Yesod, Conduit, or really any non-trivial library implemented in Haskell). Hand wavy stuff like, "oh, you don't need to know that, it's all just simple building blocks", mixed with, "go read this paper [filled with unicode symbols that have no meaning whatsoever to someone without a background in higher level math]" creates a split message, on the one hand Haskell is simple; on the other, beyond complex. I'd say that F#, OCaml, and Scala are all more accessible than Haskell just due to their placing less of a cognitive burden on the beginner. Learning Haskell feels like reverse engineering my mind. Will be interesting to see how things play out, Haskell is moving fast and is clearly ultra popular here on HN, perhaps startups are already using Haskell in anger (i.e. over Rails, Play et al).
- a-nikolaev 12y agoThe article addresses a real problem. Haskell is presented by its neophytes as some uber-arcane thing that cannot be understood by a mere average programmer, you have to learn algebra first!, and read all Martin-Lof, and whatever else. And it hampers adoption of the language by many other people who might be offended by such superiority attitudes. However, it is much healthier to present Haskell as simply a tool for writing better and safer code, which is frequently easier to reason about than your conventional for-loops all the way down. So everyone should try it, and say for themselves. I may be wrong and over-generalizing here, but Haskell is a very convenient vehicle for showing off and belittling others. And honestly, who does not want to stick Haskell somewhere in their CV just to look better nowdays? Being fancy has a cost for the language. This is not an intrinsic fault of Haskell. People just need such a thing. If there were no Haskell, we would have APL, Lisp, Erlang, C++, or something like this.
- VMG 12y agoBut isn't it also a mistake trying to portray Haskell as just-another-langauge? It clearly is not, it is more difficult to learn. Like with most things in life, the benefits appear after putting a lot of effort into it. I don't get the impulse to portray Haskell as "easy". The perceived arrogance of Haskellers may also come from that. You don't defuse arrogance by saying "Look, I'm not smarter than you. This is easy. Now let's talk about Monads, they're just like Tacos. I'm patient." Better be honest and say "Look, I'm not smarter than you. This is hard. We need to start with data types, and the benefits won't be obvious until long down the road."
- a-nikolaev 12y agoGood point. Programming should be explained at the right pace, and in rather small digestible chunks. Then Haskell is not harder than anything else. The basics of Haskell are very easy actually. Function is just a function, it maps values and you can call it recursively. And then, advanced topics are hard in any big language, and in my opinion C++ is the queen here, yet it's taught to freshmen in some schools.
- BrandonM 12y ago
- jackmaney 12y ago> This is not a language for clever people, although there are clever things that can be done in this language. It is a language for simple things and clever things alike, and sometimes we want to be simple, and sometimes we want to be clever. But we don’t give bonus points for being clever. I'm reminded of the adage about mathematics: think deeply of simple things.
- kelvin0 12y agoWow, so many truths and core principles about life and social interaction in such a concise post. I have started 'fiddling' with Haskell recently but after reading this I realize I have some serious work to do with my interpersonal skills and communication and being more considerate to others. Enlightening on all fronts..
- dustingetz 12y ago"You do not tell them this is a language for smart people. You do not tell them you are smart because you use this language. You tell them that types are for fallible people, like we all are. They help us reason and catch our mistakes, because while software has grown more complex, we’re still stuck with the same old brains. If they tell you they don’t need types to catch errors, tell them that they must be much smarter than you, because you sure do." This tactic is used a lot in evangelism talks and it doesn't work. A lot of the non-FP people listen to these talks and come away thinking, "this person is obviously really smart", and then it comes up in the discussion afterwords, so not only is it unhelpful, but it distracts from the message and perpetuates exactly the myth that we're trying to dispel. We have to calibrate to the audience's understanding of relative words like "smart".
- the_af 12y agoThis. I tried to say something like this in another comment. I am a Haskell fan, but the article sounds like evangelism -- and like with evangelism, its tactics of always-show-you're-humble will inevitably annoy a large number of people.
- AnimalMuppet 12y agoWell, the "If you use anything else, it's because you're too stupid to understand how wonderful Haskell is" attitude also annoys people. (This is not a caricature. People on this board - though not necessarily this thread - have come across that way to me.)
- the_af 12y agoYes, yes, being rude also annoys people. What I'm saying is that many people detect the evangelist's "always humble" attitude for what it truly is: hidden condescension.
- AnimalMuppet 12y agoI didn't read the article that way at all. I read it as a plea for real humility, not fake humility. And I don't think real humility can be hidden condescension.
- joslin01 12y agoThis is one of the best essays addressed to programmers I've ever read. It speaks to you on a very personal level. Highlights: > Haskell wasn’t built on great ideas, although it has those. It was built on a culture of how ideas are treated. > In functional programming, our proofs are not by contradiction, but by construction. If you want to teach functional programming, or preach functional programming, or just to even have productive discussions as we all build libraries and projects together, it will serve you well to learn that ethic. > Believe in everyone, attack nobody, even the trolliest. > If you make even the most modest (to your mind) mistake, be it in social interaction or technical detail, be quick to apologize and retract, and do so freely. What is there to lose? Only your pride. Who keeps track? Only you. What is there to gain? Integrity > Your self-esteem doesn’t need your help. You may feel you need to prove yourself, but you don't. Other people, in general, have better things to do with their time than judge you, even when you may sometimes feel otherwise. > Be glad that others are charting other paths! Who knows what they will bring back from those explorations. > Every time we learn something new and want to share it, we face these issues all over again -- the desire to proclaim, to overturn received wisdom all at once -- and the worse the received wisdom, the more vehemently we want to strike out. But if we are generous listeners and attentive teachers, we not only teach better and spread more knowledge, but also learn more, and enjoy ourselves more in the process.
- bgilroy26 12y agoThis is my favorite section of the essay as well. What a great approach to disagreement, and how fruitful! It's a mindset that shows tremendous respect for others, yet tremendous self-assurance. It's the faith that the best ideas will win out in the long run.
- jeffreyrogers 12y agoIt looks like I'm one of the few people on here not excited about Haskell. Functional programming is great. Static typing is nice, yes. Hindley-Milner type-inference even moreso, but I often find the language getting in my way. Now, I'm not a Haskell expert, but I have used OCaml for some fairly sophisticated problems in the past (basic optimizing compilers). So I'm curious for the people who have used Haskell for something substantial whether they've found their experiences match with mine.
- judk 12y agoHaskell is a research language. It is the most viable research language for production applications. A few people will solve a major business or life problem with Haskell. Many more people will take the ideas back to improve the quality of their Java or C# code.
- jeffreyrogers 12y agoThat's a good point, and I've definitely used more functional language techniques in my regular programming since learning Haskell/OCaml.
- codygman 12y agoThis probably doesn't meet your (or my) qualification for substantial, but might be useful anecdata. I recently used (early July 2014) Haskell for a crud app with a daemon that does some web scraping/form posting where no API existed for a freelance client. Haskell did not get in my way whatsoever. Here are some general stats about the application: 604 loc (was 1400 at one point, 900 after de-duplication, 604 after refactoring) 112 commits The crud website and daemon program take up about 200 MB of memory IIRC on a $5 per month digital ocean droplet.
- kazinator 12y agoTechniques for implementing heterogeneous collections in Haskell: http://www.haskell.org/haskellwiki/Heterogenous_collections http://www.haskell.org/haskellwiki/Heterogenous_collections Good grief! Lisp: '(123 a "bc" #(d)) Python: [1, "abc", 4.0]
- jlouis 12y agoThere is no easy way around this if you really want a collection which is heterogenous, but often, you would just cook up a struct/record-like object for these things. Trading off easy heterogenous lists buys you a better type checker, more static knowledge, faster programs and so on. It also has the advantage that mapping data into the system can be done safely. The price is that self-describing data (JSON, Transit, Msgpack, ...) is more unwieldy to work with - but a little combinator library, scrap-your-boilerplate-generics, or a reflective code generator goes a long way to solve that problem: - OCaml: Yojson.Basic.Util - Haskell: Generics, Rank2 polymorphism - Go: JSON unmarshalling are all examples of how to handle that problem.
- kazinator 12y agoYou seem to be implying that the generic lists shown in Python or Lisp are somehow unsafe. They must be since if we throw them away, or wrap them in some clumsy structs/records, we can "buy" safety. Even if that is the case, we cannot sell Haskell as some kind of semantically rich language for doing cutting edge research, when coding up basic things like this is a struggle. If I have to cook up things with structures, I might as well use C. Here is another simple problem: divide two integers so that the result has integer type when the numbers divide evenly, otherwise rational type.
- AnimalMuppet 12y agoI am by no means an expert, but I think that Haskell handles your second problem without blinking (because integer is a subtype of rational). For your first problem, C doesn't help in the general case. If I got a JSON package, I don't know at compile time what the types are going to be, so I don't know how to lay out the struct. If I don't know anything about the types, the only things I can (safely) do are put them in untyped collections or convert them to strings. I can't add them - they might not be numeric. I can't convert them to uppercase - they might not be strings. (I can do all those things if you're going to return a Maybe - and maybe that's the right approach if you got a JSON package over the wire.)
- Vektorweg 12y agoFor me, it sounds like: go and study anthropology/ethics. Would be better for everyone.
- soperj 12y agoI actually learned some Haskell during my CSC degree, and it was actually a language that I took to really easily and enjoyed. I actually went home and made sure I could write haskell programs at home. It's been 8 years now though and for the life of me I've never been able to think of something I'd use it for.
- the_af 12y agoIf you enjoy Haskell and programming, why not start a hobby project with it? It's a general purpose language after all. (Using it at your day job is a different proposition, of course. I'm still having arguments with my boss over the use of Scala instead of Java. Imagine if I proposed moving outside the JVM!)
- soperj 12y agoI have lots of hobby projects, I just can't see how Haskell itself would be useful. I do back-end stuff at work, so most of the stuff I do at home tends to be front end web apps. Based on what I learned of haskell at the time, it doesn't really seem like the right language for that sort of thing.
- codygman 12y agoWhat do you do for work? Try implementing something you implemented at work with Haskell then seeing if there are any advantages/disadvantages ;)