4 ms·
There’s an idea that you should work in the highest level language you can get away with for the task at hand. E.g. if you were writing a device driver, you mi
by CraigJPerry 5y ago
There’s an idea that you should work in the highest level language you can get away with for the task at hand.
E.g. if you were writing a device driver, you might try to choose c over asm wherever you can. If you were writing an enterprise app, you might choose java over c++. Etc etc
The idea is that you don’t want to give up productivity boosters like garbage collection unless you’re forced to.
But it’s just an idea and not everyone buys into it. Otherwise we’d all be writing in the ultimate programming language (lisp).
- Mikeb85 5y ago> Otherwise we’d all be writing in the ultimate programming language (lisp). I like Lisp, but I'd argue that languages like Python and Ruby are higher level. Also easier to read.
- CraigJPerry 5y agoYeah i think i have to agree with easier to read - although now that i'm used to lisp syntax, it's less clear cut than it used to be for me. I really like lisp when it's written in an immutable style, it becomes really easy to divide and conquer a code base to understand only the bit you care about editing - but it's not an absolute thing, i still have reservations about macros even though i've personally not yet been bitten. Higher level - i think that has to go to lisp and it's because of macros. You can write your own programming language, lisp is more like a toolkit for creating the ideal language for solving your problem in that regard.
- Mikeb85 5y agoI mean, I don't find Lisp hard to read, the parens disappear in my mind and it looks almost like Python-esque white-spaced code if you space things correctly albeit with weird function names. But it is at a lower level than Ruby/Python if you don't use macros, to make it "higher level" you use macros, but at that point you're in DSL territory, you can always just add more abstractions to any language really and write DSLs in plenty of languages (something like Rails which uses a bunch of metaprogramming could almost be called a DSL). Lisp IMO is in a strange spot where idiomatic enterprise-y Common Lisp is between Java and Ruby/Python, Lisp + Macros or something like Clojure is higher level. I think Ruby/Python are winning almost just because of their usage of readable and common sense English words.
- zuj 5y agoThat's an interesting take. Reminded me of this https://twitter.com/brettsky/status/1455600734813052930?s=20 https://twitter.com/brettsky/status/1455600734813052930?s=20
- CraigJPerry 5y agoI think python is probably the more pragmatic choice of ultimate programming language - certainly easier to hire python talent than lisp talent. I agree with all 4 of those points in that tweet. You can do some pretty twisted things from the comfort of python, e.g. years ago i was able to create an LD PRELOADable shim in python: https://github.com/CraigJPerry/pyshim https://github.com/CraigJPerry/pyshim