3 ms·
yes, but you have the ability to tailor the language and create constructs to deal with your problems more concisely. i learned lisp before C. i always found C
by utx00 18y ago
yes, but you have the ability to tailor the language and create constructs to deal with your problems more concisely.
i learned lisp before C. i always found C to be very obtuse and arbitrary. for example:
1. why can't i define a function inside a function and then return it, why can't i define a function based on some conditional?
2. macros that are just text expansions are useless (well not useless but in comparison to lisp macros!)
3. no way to embed a mini language. or way, but too difficult. in lisp you don't even have to think about it. (a little query language, or a little configuration language, or a language to do gene annotations based on certain protein sequences that non-computer people can write in :)
4. you have to compile and use a debugger. in lisp you can change and run things as you write them.
5. recursion is unequivocally expensive.
6. can't write new iteration constructs (or you can by passing function pointers but it's limited and ugly)
7. no anonymous functions! c'mon!
etc etc
so the fact that lisp doesn't map into a preconceived model of understanding has very little practical significance ... C, by all measures, is less powerful and wouldn't allow me to do my work with reasonable amount of effort. neither would python btw. as i maintain a domain specific language that would have been very difficult to write in some other language.
- markessien 18y agoYes, you use the power of lisp to solve your own problem, and that's good. And I absolutely agree with you that lisp is an excellent languages for solving problems. But it does not change the fact that lisp is not easily accessible for most people, and that particular limitation of lisp is why it will not be 'the next big thing'. On a personal note, I don't think that using DSLs is good programming practise. It is my opinion that this makes your code too specific to you and you force anyone trying to understand your code to first learn a new language - the one you just invented. It's like comparing Seth Godins writing to the writings of Kant. There was a time when I was in philosophical mood and I bought the original German version of a book by Kant. Kant is often described as one of the great thinkers, but he sure is not one of the great writers. His sentences are long and unwieldy and it's very difficult to understand what he's trying to say. Seth Godin writes plainly, however, and he communicates his ideas clearly. The core purpose of reading both their writings is to gain in knowledge, and when the sentence structure of one writing is so obscure that one can't even parse the sentence, then this purpose is not being achieved. Writing a DSL is the same thing - if nobody else understands what you wrote, then, though you may have succeeded in communicating your meaning to the computer, you have failed in communicating to anybody else who may want to improve your code. And that second part of things is also an important part of programming.
- utx00 18y agothat's interesting. in the original german! you're braver than me. i think DSL's are good for the same points you bring up. i am more concerned with the DSL ability to express a problem/solution. the DSL itself of course necessitates different expertise. just like there a lots of python users, but only a few people who work on the python core. or for that matter linux users vs the linux kernel team.
- Hexstream 18y agoYou're completely off-track on the DSL part. I'd rather have to learn a new small DSL language that lets me read and write exactly what is meant (the semantics of the language map almost directly to the language of the domain) than a big clunky API (apis are languages!) that will make my code littered with book-keeping tasks when I use it.