Hacker News new | past | comments | ask | show | jobs | submit login

I learned C and Lisp at exactly the same time, during a six month internship in 1988. I wrote a program to interpret hand sketched input on a tablet and turn it into a CAD model.

Before I started I only knew Basic and a little Fortran but the project I worked on required me to learn these two new languages, C for the low-level code that interfaced to a graphics tablet and the display driver, Lisp for the code that did some analysis on the lines and geometric shape drawn by the user.

I remember that on days I was working on the Lisp code I was happy and things seemed in harmony. On C days I often ended the day worried and headachy.

However, I couldn't have written the C portion in Lisp and writing the Lisp portion in C seemed unreasonable at the time as well.

What I take from the experience is that, to some extent, Lisp seems so much more productive is that it's typically chosen for programming tasks that don't deal with the ugliness and "hardness" of things like drivers or other low-level code. Not sure about GUIs but that's another area where programming becomes tedious and unfun, at least for me.

So, I don't think that Lisp is chosen for easier tasks but definitely for tasks where a solid grounding in CS and an ability to think abstractly is more important and there's some level of self-selection going on in those areas.




> Not sure about GUIs but that's another area where programming becomes tedious and unfun, at least for me.

When I have problems with UIs it's because there's a lack of separation in structure, design, and scripting that you get with HTML+JS or MXML+ActionScript which both make UI dev really easy and fun. In contrast, I think Swing, AWT, WxWidgets, Tkinter, GTK, Windows API, .NET, and even Qt make graphics programming a pain in the neck (some more than others). But once you get toward a more web-approach of UI, s-expressions are a perfectly fine way of representing XML too. Tags are functions, Perl realized that as well.

My own experience with writing low level software is that without a good support library you're going to be doing assembly that may be painful depending on the microcontroller and what you're interfacing with. (ARM stuff is pretty good.) If there are good bindings for higher languages like Lisp, programming in Lisp becomes nice again. PyGame is a great example of porting a (in my view) somewhat ugly C library that is SDL and making it nice and neat to use in the higher level Python. I know a team in Colorado who are using Flex to build a multi-touch application on a USB tablet.

In the face of no good library though, C is definitely a great choice and it's useful for augmenting assembly. If I want to worry about memory and pointers, C's my goto language.


Very true. 99% of my work is C on small, embedded ARMs now and we don't have a display so no need to worry about GUI directly. However, we do have web servers and the GUI work has become more pleasurable with HTML+JS and/or (gasp!) PHP.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: